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.

PHP error logs

Discussion in 'General Discussion' started by HostMerit, Mar 12, 2018.

  1. HostMerit

    HostMerit Well-Known Member

    Joined:
    Oct 24, 2004
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    New Jersey, USA
    cPanel Access Level:
    DataCenter Provider

    I'm having a similiar issue. Moving a user from a system to a new system, and they're getting 500 errors that aren't logging. I've enabled display_errors, checked the local error_log, /usr/local/apache/logs/error_log, and in /home/USER/logs/

    The user wants the old condition back where if there was a PHP error on their server it would display in the browser. Now we can't even get the error to log on the new server, but a 500 is replied.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you verify which PHP handler is assigned to the account (e.g. suPHP, DSO, PHP-FPM)?

    Thank you.
     
  3. HostMerit

    HostMerit Well-Known Member

    Joined:
    Oct 24, 2004
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    New Jersey, USA
    cPanel Access Level:
    DataCenter Provider
    Only CGI is showing in the PHP Handler section as an option, even though SuExec module is installed.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Suexec isn't a PHP handler. We document the available PHP handlers and the considerations for using them at:

    PHP Handlers - EasyApache 4 - cPanel Documentation

    As far as the internal server error message (500 error code), that's an Apache error and thus should appear in the Apache error log (/usr/local/apache/logs/error_log). Are you sure the domain name resolves to the correct IP address?

    Thank you.
     
  5. HostMerit

    HostMerit Well-Known Member

    Joined:
    Oct 24, 2004
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    New Jersey, USA
    cPanel Access Level:
    DataCenter Provider
    Meant suPHP. CGI is the handler, and repeated 500 errors, but the error isn't logging to /usr/local/apache/logs/error_log.

    Quite sure as I've hardcoded the IP locally.

    I can see the 500 in /usr/local/apache/domlogs/domain.com, but the error isn't logged, and isn't shown in the browser, only a 500 is returned.

    I can enable suPHP, but why is cPanel not showing or logging the error under CGI mode, or displaying it in the browser?
     
  6. HostMerit

    HostMerit Well-Known Member

    Joined:
    Oct 24, 2004
    Messages:
    164
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    New Jersey, USA
    cPanel Access Level:
    DataCenter Provider
    Switched to suPHP and error logs are generating now, not sure where they were going earlier while in the stock CGI mode.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,247
    Likes Received:
    1,759
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page