Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: HDB on May 14, 2017, 09:28:17 PM

Title: SMF 2.0.14 Image Proxy
Post by: HDB on May 14, 2017, 09:28:17 PM
First off let me say that I have found the "enable image proxy" check box in the server settings in the general tab in the Admin CP. I have turned it on

I have an https forum and when I turned on the image proxy the threads that have mixed content images that are coming from outside the forum via http sources are not showing.

Some things that might have some bearing on this issue are ...

My shared hosting account does not have a detectable accelerator and I have always gotten this Red message on the Server Caching page in the Admin CP...

SMF has not been able to detect a compatible accelerator on your server.

I have never had the cache for the server set to the recommended "Level 1 Caching" since my host has no detectable accelerator. In an effort to resolve this image proxy issue I turned it on to "Level 1 Caching (Recommended)". That did not help.

In Database and Paths (in Admin CP Server Settings) I have always had a defined path for cache called out home/hd******in/public_html/cache. No changes were ever made here (just info for your consideration).

Also in an effort to solve this I have emptied the forum's cache in the Admin CP Forum Maintenance under Routine tab "Empty the file cache" > Run Task Now. No resolution was seen by doing this.

I have also cleared my browser's cache and it still is an issue.

I also have a WAF and I turned off the cache (which was ON) from my dashboard in the WAF. Still no help. No pictures.
Title: Re: SMF 2.0.14 Image Proxy
Post by: HDB on May 14, 2017, 09:51:59 PM
Additional info...

When I open the missing image in a separate tab I get a parsing error.

https://hd******in.com/proxy.php?request=http%3A%2F%2Fwww.iammoon.com%2Falbums%2FFXDI%2520Inner%2520Primary%2520Bearing%2520R-R%2Fslides%2FIMG_20170401_132645759.jpg&hash=7d465c543a1a55c50bbc13ce109d7714

The error from the above link is...

Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /home/hd******in/public_html/proxy.php on line 173



Title: Re: SMF 2.0.14 Image Proxy
Post by: vbgamer45 on May 14, 2017, 09:53:47 PM
HDB what PHP version are you running?
Title: Re: SMF 2.0.14 Image Proxy
Post by: HDB on May 14, 2017, 09:55:50 PM
Quote from: vbgamer45 on May 14, 2017, 09:53:47 PM
HDB what PHP version are you running?
5.4
Title: Re: SMF 2.0.14 Image Proxy
Post by: vbgamer45 on May 14, 2017, 10:24:25 PM
If possible try to upgrade to 5.6 that should be safe for your site if you are using just SMF.
Title: Re: SMF 2.0.14 Image Proxy
Post by: HDB on May 14, 2017, 10:44:32 PM
 It looks like they have pre-selected some PHP modules that would be default. I set it to 5.6 and got a white screen. It is back at 5.4 now and the forum works again. But still mix content images are missing.
Title: Re: SMF 2.0.14 Image Proxy
Post by: vbgamer45 on May 14, 2017, 11:03:13 PM
Looks like  a bug change

$response = $request->result();

if (empty(response)) {
return false;
}

To

$response = $request->result();

if (empty($response)) {
return false;
}
Title: Re: SMF 2.0.14 Image Proxy
Post by: HDB on May 14, 2017, 11:22:27 PM
What file would that change be for?
Title: Re: SMF 2.0.14 Image Proxy
Post by: Colin on May 14, 2017, 11:22:38 PM
proxy.php
Title: Re: SMF 2.0.14 Image Proxy
Post by: HDB on May 14, 2017, 11:31:58 PM
Fantastic!!! It works! Thanks vbgamer45!!

And Colin too!!
Title: Re: SMF 2.0.14 Image Proxy
Post by: SleePy on May 14, 2017, 11:32:55 PM
Interesting that this happened.  It never triggered any issue on any of the test sites we have, doesn't throw a undefined constant (as I would expect here) or trigger any syntax error in any version of PHP we tested.  My IDE does see it as a keyword for a method though.  So I wonder if PHP sees it as some keyword and accepts it.

FYI, We are fixing the files here.  Patch is fixed and downloads are in the process of being fixed.  Thanks for the catch.
Title: Re: SMF 2.0.14 Image Proxy
Post by: MobileCS on May 14, 2017, 11:47:13 PM
If we uninstall the patch, will the administration section show the download link again?
Title: Re: SMF 2.0.14 Image Proxy
Post by: Colin on May 14, 2017, 11:50:25 PM
Quote from: MobileCS on May 14, 2017, 11:47:13 PM
If we uninstall the patch, will the administration section show the download link again?

Yes or you can just manually download it from the download page.
Title: Re: SMF 2.0.14 Image Proxy
Post by: MobileCS on May 14, 2017, 11:54:30 PM
Thank you. This is the first time I've seen the "Package Manager Updates" link on the left side.
Title: Re: SMF 2.0.14 Image Proxy
Post by: Yariksat on May 15, 2017, 06:38:28 AM
At me at initial loading the broken image is displayed, at repeated loading of page of the normal image.
File from the attachment is working properly?
Title: Re: SMF 2.0.14 Image Proxy
Post by: Illori on May 15, 2017, 06:47:01 AM
please start your own topic for your own issue. this topic belongs to someone else and is marked solved.
Title: Re: SMF 2.0.14 Image Proxy
Post by: Geor'G on May 15, 2017, 07:02:16 AM
Quote from: HDB on May 14, 2017, 09:51:59 PM
Additional info...

When I open the missing image in a separate tab I get a parsing error.

https://hd******in.com/proxy.php?request=http%3A%2F%2Fwww.iammoon.com%2Falbums%2FFXDI%2520Inner%2520Primary%2520Bearing%2520R-R%2Fslides%2FIMG_20170401_132645759.jpg&hash=7d465c543a1a55c50bbc13ce109d7714

The error from the above link is...

Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /home/hd******in/public_html/proxy.php on line 173





PHP 5.6.29
Also this problem.

RU:
Тоже эта проблема.

Quote from: vbgamer45 on May 14, 2017, 11:03:13 PM
Looks like  a bug change

$response = $request->result();

if (empty(response)) {
return false;
}

To

$response = $request->result();

if (empty($response)) {
return false;
}

This has already been fixed.

RU:
Это уже исправлено.
Title: Re: SMF 2.0.14 Image Proxy
Post by: Yariksat on May 15, 2017, 07:10:13 AM
This is it ? - https://www.simplemachines.org/community/index.php?topic=553875.0

Это оно ? - https://www.simplemachines.org/community/index.php?topic=553875.0
Title: Re: SMF 2.0.14 Image Proxy
Post by: Geor'G on May 15, 2017, 07:19:00 AM
Quote from: Yariksat on May 15, 2017, 07:10:13 AM
This is it ? - https://www.simplemachines.org/community/index.php?topic=553875.0
Tried already.

Working:
[img]http://s16.radikal.ru/i190/1705/cc/b3b75e5c7ecd.jpg[/img]

Does not work:
[url=http://radikal.ru/fp/4o2v4y0kg0tc6][img]http://s16.radikal.ru/i190/1705/cc/b3b75e5c7ecdt.jpg[/img][/url]
Title: Re: SMF 2.0.14 Image Proxy
Post by: Illori on May 15, 2017, 07:29:49 AM
if you believe you have found a bug in SMF please post in the bug reports board instead of here.
Title: Re: SMF 2.0.14 Image Proxy
Post by: Yariksat on May 15, 2017, 07:30:12 AM
Quote from: Geor'G on May 15, 2017, 07:19:00 AM
Does not work:
[url=http://radikal.ru/fp/4o2v4y0kg0tc6][img]http://s16.radikal.ru/i190/1705/cc/b3b75e5c7ecdt.jpg[/img][/url]
I have it running