PHP Fatal error: Unknown: Failed opening required

Discussion in 'PHP' started by semprot, Apr 5, 2018.

  1. semprot

    semprot Well-Known Member

    Hello.

    Suddenly i get lot of this error in error_log :
    Code:
    2018-04-05 08:32:47.370472 [NOTICE] [x.x.x.x:28043] [STDERR] PHP Fatal error:  Unknown: Failed opening required '/home/*****/public_html/*****.php' (include_path='.:/opt/cpanel/ea-php71/root/usr/share/pear') in Unknown on line 0
    And looking at the cpanel account name, it happens only on accounts which use PHP 7.1.
    On accounts which use PHP 7.0, there are no error messages.

    This just happened since yesterday (because i noticed i experienced lot of HTTP 500 errors, so i started to check the log).

    According to PHP 7.1 changelog, PHP 7.1.6 which i have at this moment was released 29 March (about 1 week ago).
    So i am not sure if it is caused by latest PHP 7.1 incremental update or not.

    If i changed the PHP on those accounts from PHP 7.1 to 7.0, there are no more error messages.
    But when i switched back to 7.1, error messages are starting to appear again.

    I have compared PHP.ini between 7.0 & 7.1, there is no difference.

    Do you have any idea what should i check?

    Thank you.
     
  2. Pong

    Pong Well-Known Member Staff Member

    seems a little-wired issue and only happen to 7.1, but not 7.0. Is it a cpanel server? Does the error show when switching to apache? If apache ok, you can log a ticket with us by providing tmp root access for us to take a look.
     
  3. MattW

    MattW Well-Known Member

    I've had the exact same issue starting this morning. It's happening on PHP7.1 and PHP7.2 since the update:
    https://forums.cpanel.net/threads/ea-php71-7-1-16-causing-500-errors.625879/
    I have another server with the exact same setup, which is still on PHP7.1.15 and PHP7.2.3 that doesn't have the issue. It's started the second after the yum update occurred overnight to PHP7.1.16 and PHP7.2.4
     
  4. semprot

    semprot Well-Known Member

    @Pong : Yes it is a cpanel server.
    I have not tried to use apache, because apache can't handle the load.
    Only LSWS can :)

    @MattW : Glad i'm not the only one to have this issue.
    Then i think it is related with PHP 7.1.16?
    Because i use EA 4, i think the PHP version is updated automatically and i don't know when EA 4 updated to 7.1.16.
     
  5. MattW

    MattW Well-Known Member

    Check the yum.log file in /var/log and it will show you when it was updated.
     
  6. mistwang

    mistwang LiteSpeed Staff

    I figured out the root cause of this.
    It is due to a bug in PHP LiteSpeed SAPI 7.0, which affects PHP suEXEC daemon mode.
    You can either downgrade the PHP package to the one using LiteSpeed SAPI 6.11,
    or switch to PHP suEXEC process group mode, by simply turning off the daemon mode
    update /usr/local/lsws/conf/httpd_config.xml , change
    to
    We will release LiteSpeed SAPI 7.1 soon, but it is going take a while to have third party binary rpm packages updated.
     
  7. semprot

    semprot Well-Known Member

    @mistwang : thank you, i think i will use PHP 7.0 at this moment while waiting for latest litespeed update :)
     
  8. MattW

    MattW Well-Known Member

    Same here, I'm sticking with PHP7 until the actual fix is released.
     
  9. mistwang

    mistwang LiteSpeed Staff

    PHP LiteSpeed SAPI 7.1 has been released, it will take some time for other down-stream rpm packager to use the new code.
    If you compile from source, you can do it now, otherwise, just wait. :)
     
  10. MattW

    MattW Well-Known Member

    I've set all my servers back to:
    upload_2018-4-11_22-13-29.png
    from suEXEC Daemon until the update is pushed, as I wanted to get the updated PHP versions on them.
     
  11. semprot

    semprot Well-Known Member

    What if i use cpanel litespeed plugin?
    Should i wait?
     
  12. mistwang

    mistwang LiteSpeed Staff

    If you use ea4 php rpm, you need to wait for the rpm update to SAPI 7.1, usually, it requires a new official release of PHP 7.1 .
     

Share This Page