Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Function file get contents not working with EA4

Discussion in 'EasyApache' started by psytanium, Aug 14, 2017.

  1. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    87
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,127
    Likes Received:
    1,366
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
  3. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    87
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    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
     
  4. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    87
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    sry PHP-FPM is off for all domains. Im not able to enable it.
     
  5. psytanium

    psytanium Well-Known Member

    Joined:
    Jun 6, 2014
    Messages:
    87
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    I changed the PHP versions inherited to be able to turn onPHP-FPM on all domains.
    Now its working. thanks
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,127
    Likes Received:
    1,366
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see the issue is now solved. Thank you for updating us with the outcome.
     
  7. lm137

    lm137 Member

    Joined:
    Aug 16, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    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.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,127
    Likes Received:
    1,366
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.

    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.
     
  9. lm137

    lm137 Member

    Joined:
    Aug 16, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Earth
    cPanel Access Level:
    Root Administrator
    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.
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,127
    Likes Received:
    1,366
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page