[BlueOnyx:26866] Re: Turn on allow_url_fopen for vsite
Michael Stauber
mstauber at blueonyx.it
Sat Mar 23 12:16:12 -05 2024
Hi Robert,
> I have a vsite on a 5209R running Solarspeed PHP 8.1 and having problems
> getting images to show up with a certain copy protection plugin used in
> WordPress. The error reported is:
>
> [Sat Mar 23 11:52:19.280525 2024] [proxy_fcgi:error] [pid 6130] [client
> 144.129.73.34:6171] AH01071: Got error 'PHP message: PHP Warning:
> imagecreatefrompng(): http:// wrapper is disabled in the server
> configuration by allow_url_fopen=0 in
> /home/.sites/43/site28/web/wp-content/plugins/wccp-pro/watermark.php on
> line 594PHP message: PHP Warning:
> imagecreatefrompng(http://www.fostoriaamerican2056.com/wp-content/plugins/wccp-pro/images/testing-logo.png?x=wccp_pro_watermark_pass): Failed to open stream: no suitable wrapper could be found in /home/.sites/43/site28/web/wp-content/plugins/wccp-pro/watermark.php on line 594'
Oh dear. The designers of that plugin need to be tared and feathered.
Their script basically takes your image and then uses allow_url_fopen()
to make a call against your own server. There is absolutely no need for
using allow_url_fopen() in that case. allow_url_fopen() is to access
URLs *other* than the ones on your server and both allow_url_fopen() and
allow_url_include() are often abused for malicious purposes. That's why
they're disabled by default.
> I tried turning this setting on at the vsite level, but still off.
Yeah, in PHP this is a global setting. It's either on or off on a server
level and there is no sensible way to limit it to a per Vsite level.
> I'm thinking it must need to be On at the server level. When I tried that,
> the change never saved with the progress bar continuing to show until I
> finally stopped php-fpm service on the command line and let swatch get
> all going again. But still not turned on looking at phpinfo for the
> Vsite.
Especially when you have many Vsites it may take a minute or two until
all PHP-FPM instances and Apache have been restarted. So it should
eventually be turned off after the Save transaction has finished and the
server had some time to catch up.
Please try again to enable url_fopen() via the GUI and if that doesn't
work, then please file a "Support Request" via the GUI and I'll take a look.
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list