Function file get contents not working with EA4
Hello,
After I upgraded to EA4, the function file_get_contents() output some errors on the website.
The "allow_url_fopen" is enabled in "MultiPHP INI Editor"
Apparently this problem exist on HTTPS websites.
Error:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /home/user/public_html/product_info.php on line 689
What should I do ?
Thanks
-
Hello, Could you verify which PHP handler you are using for the affected domain name? Is PHP-FPM enabled for the account? Also, did you enable "allow_url_fopen" in the cPanel MultiPHP INI Editor, or in the WHM MultiPHP INI Editor? Thank you. 0 -
Hello, All my domains use PHP version ea-php56 PHP handler for ea-php56 is dso PHP-FPM is enabled allow_url_fopen is enabled for ea-php56 Thanks 0 -
sry PHP-FPM is off for all domains. Im not able to enable it. 0 -
I changed the PHP versions inherited to be able to turn onPHP-FPM on all domains. Now its working. thanks 0 -
I changed the PHP versions inherited to be able to turn onPHP-FPM on all domains. Now its working. thanks
Hello, I'm glad to see the issue is now solved. Thank you for updating us with the outcome.0 -
This is only a very recent bug in the EasyApache stack. I have been using EA4 for about a year and everything was fine until approx. 14 days ago when this problem surfaced (presumably after an automatic update). Advising to switch to PHP-FPM is not a satisfactory resolution of the problem. What if a bug is later introduced in the FPM implementation - will users be advised to switch back to the broken DSO handler? I tried PHP-FPM, and indeed the bug was not present, but it is not compatible with Apache mod_userdir: static files still work, but php files display "File not found.". I tried changing chdir to "/home" in the pool configuration and restarting php-fpm, but this alone has not done the trick. I suspect there will be something in the Apache configuration, but I don't have much time to find it. Please advise how I can make mod_userdir work for PHP-FPM, and in any case, please fix the underlying bug with the DSO handler. Thank you. 0 -
Hello @lm137, The OpenSSL verification failure message that occurs when using the DSO PHP handler is related to the issue discussed on the following thread: In Progress - Issue with openssl after EA4 update We'll update that thread as soon as the resolution is published. Please advise how I can make mod_userdir work for PHP-FPM, and in any case, please fix the underlying bug with the DSO handler.
The CGI, FastCGI, and PHP-FPM PHP handlers are not compatible with the Apache mod_userdir module. This is documented at: Apache mod_userdir Tweak - Documentation - cPanel Documentation Thank you.0 -
Hi Michael, Thank you for your reply and for linking to the thread with the ongoing issue. I hope it is resolved soon. I will use your advice to downgrade ea-libcurl. I saw a thread with someone managing to configure nginx for mod_userdir to work with FPM. Is this not possible with Apache or is this a cPanel restriction. Thank you. 0 -
I saw a thread with someone managing to configure nginx for mod_userdir to work with FPM. Is this not possible with Apache or is this a cPanel restriction.
Hello, There's no support for enabling Mod_Userdir with PHP-FPM in cPanel. While it might be possible with third-party applications such as Nginx, we generally advise using an alternative to Mod_Userdir to access domain names over a temporary URL. Here's a link to one such method: [Tutorial] Editing your local hosts file to preview sites Thank you.0
Please sign in to leave a comment.
Comments
9 comments