inserted images using http url not showing

Started by brynn, February 20, 2018, 05:52:56 AM

Previous topic - Next topic

brynn

Hi Friends,
I think I might be having a problem with the image proxy.  Inserted images using http in the url, don't show up.  Images with https url are showing up as expected.

I checked my settings, and the image proxy is enabled.  Since I don't understand the image proxy very well, I'm not sure what else to check.

I recently upgraded to 2.0.15 (with a lot of help from Lex).  (The short version is that a mod which I had previously uninstall, had not been completely uninstalled.  Once I manually uninstalled it, it worked.)  My change to full https was some months ago, but seemed to be successful at the time. 

I'm actually not sure when this problem first started, but we just now discovered it.  I'm positive that the images which are now missing, were showing previously.  I just don't know when they might have disappeared.

Oh!!  It seems like there was one tiny edit to the proxy.php file in the last upgrade.  Let me check....  Ok, it looks like I did not upload a "fixed" file, which means that when I looked up the codes to change them, I thought there was no change to be made. 

Is there any way to find out what the Find and Add Before code (or Replace, or whatever) was, without reverting the upgrade?

Hhm, shouldn't there be a closing tag, maybe something like this

?>

on the end of a PHP file?  There doesn't seem to be any closing tag in proxy.php file.

Could that be the problem?

Aleksi "Lex" Kilpinen

Could you attach the current proxy.php you are using to your next post? :)
Be aware though that the 2.0.15 image proxy does seem to have an issue where the _first_ load of a proxied image fails, but subsequent views work.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

brynn

No, these are images which were inserted between last Oct 2017 and Jan 2018.  I remember seeing them in their topics previously.

proxy.php attached

Aleksi "Lex" Kilpinen

That would appear to be identical with the one shipped on 2.0.15 upgrade packages.
Could you give a link to post with an image not showing now?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

brynn

#4
I started a thread in our Testing board, so I could test.  https://forum.inkscapecommunity.com/index.php?topic=991.0

Of course you can't see the image in that message.  Shall I set you up as a moderator, so you can open the message for editing?  Or can you just use the source code?

Edit
PS - If you need more than one example, this topic should have several images from the same http domain, which no longer are visible.  https://forum.inkscapecommunity.com/index.php?topic=790.0

Aleksi "Lex" Kilpinen

OK, now if you can dig up your server errorlog - do you see a recent HTTP 500 error in there?
It should reference this url, or at least part of it https://forum.inkscapecommunity.com/proxy.php?request=http%3A%2F%2Fwww.haifashion.de%2Fimages%2Fcat.jpg&hash=895dcacc0b9cfc7109f9491b823133d2
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

butch2k

I tested http://www.haifashion.de/images/cat.jpg on my forum using my version of the proxy (which is not the standard one) and it loaded fine.

Your forum fails with a 500 error when attempting to load the picture, could you check your server logs and check if there is any details on the issue ?

[Edit]
Lex was quicker  ;)

butch2k

Could you check using this url https://www.planeteroliste.com/tmp/cat.jpg (same cat file) i want to check if the issue is really http related or specific to some kind of images.

brynn

I don't see any error like that in cPanel > Metrics > Errors.  But didn't you tell me a trick to have the error message displayed?  It seems like it was an edit for the index.php file maybe?

butch2k, I don't understand your message about cat file.  But maybe is directed towards SOL?

brynn

butch2k, oh you mean try inserting the image with that url, in my forum?

Aleksi "Lex" Kilpinen

See if there's a file called error_log in your forum root, or your /cache/images folder.
This isn't a PHP error, so the earlier trick wouldn't necessarily help. We need to get the server's viewpoint of this.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

butch2k

Quote from: brynn on February 20, 2018, 03:47:40 PM
I don't see any error like that in cPanel > Metrics > Errors.  But didn't you tell me a trick to have the error message displayed?  It seems like it was an edit for the index.php file maybe?

butch2k, I don't understand your message about cat file.  But maybe is directed towards SOL?
could you try in your forum the link i provided, it's the same file you try to load from http, but i want you to try the link i posted to check if there is some kind of issue as well when attempting to load from https.



butch2k

Damn i forgot that the proxy as used in standard SMF is used only for http hosted files (not the case on my forum)  ::)

[Edit]
Could you check the access rights of the image cache directory ?

brynn

Found error log in forum root.  There's a whole string of errors related to proxy.php, dating back to Feb 1st, which was approx when I did the upgrade.  This is the error:

[01-Feb-2018 22:46:53 UTC] PHP Parse error:  syntax error, unexpected '===' (T_IS_IDENTICAL) in /home/brynn/public_html/forum/proxy.php on line 197

I don't see any 500 errors.

I've also got some errors for Sub-Posts.php  (not sure how far back they go yet):

[20-Feb-2018 11:00:49 America/Denver] PHP Notice:  Undefined index: character_set in /home/brynn/public_html/forum/Sources/Subs-Post.php on line 1302
[20-Feb-2018 11:00:49 America/Denver] PHP Notice:  Undefined index: character_set in /home/brynn/public_html/forum/Sources/Subs-Post.php on line 1259

brynn

(Sub-Posts.php errors going back a couple of years!)

Aleksi "Lex" Kilpinen

I hate the way some hosts configure their logging... I really do.
We are not likely looking for a PHP code error though, because what the proxy address serves is a HTTP ERROR 500.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

brynn

Not Sub-Posts.php, but Subs-Post.php   :-[

Do you mean this is a log from my host, and not from the forum?

brynn


Aleksi "Lex" Kilpinen

Quote from: brynn on February 20, 2018, 04:26:56 PM
Not Sub-Posts.php, but Subs-Post.php   :-[

Do you mean this is a log from my host, and not from the forum?
Yes, that log is setup by your host. And likely there are many similar scattered around in your folders.

Quote from: brynn on February 20, 2018, 04:27:35 PM
What is the proxy address?
I meant the "end result" of the image being proxied: https://forum.inkscapecommunity.com/proxy.php?request=http%3A%2F%2Fwww.haifashion.de%2Fimages%2Fcat.jpg&hash=895dcacc0b9cfc7109f9491b823133d2
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: