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 showing errors, but display_errors=Off

Discussion in 'General Discussion' started by markmb, Sep 16, 2013.

  1. markmb

    markmb Registered

    Joined:
    Sep 16, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'm helping a friend with his first dedicated server (with WHM interface), and I found a weird issue:

    He migrated all his websites, and they were working. But he found that mysqli was not working. I looked for a solution, and I finally installed mysqli through EasyApache (reconfiguring Apache). When it finished, the websites were not working and with a weird and undescriptable error (something about headers) and a DEFLATE module error. So I reconfigured EasyApache again, but now with deflate. And then I solved the headers error changing suPHP for CGI. At this moments, websites were running, but with a lot of Strict Standards and Warnings (Joomla websites, mostly). I went to PHP configuration, and disabled errors: display_errors = Off. I restarted Apache, and most Websites worked.

    The problem is that some websites (I repeat, Joomla that were working perfectly before) show PHP warnings, notices and strict standards messages, while other no. There are no display_errors directive in /home/[user]/public_html/php.ini, in the general php.ini display_errors = Off, and the codes of the websites don't have anything about error_reporting or ini_set('display_errors'...)

    Probably this is not the place to ask, but I don't know what else to look at and I don't know who to ask.
    Thank you in advance
     
  2. simonas

    simonas Well-Known Member

    Joined:
    Apr 21, 2013
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    cPanel Access Level:
    Root Administrator
    Check config files of those applications.
    Usually they have debug option, which overrides default error displaying.

    Look at the index.php , config.php or search google how disable error displaying for that application.
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,482
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    The actual errors might be helpful to post here.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    It sounds like the server the account was migrated from uses an older version of PHP. You may want to upgrade the installed scripts to the latest versions provided by the developers to ensure they are compatible with the version of PHP installed on your system.

    Thank you.
     
  5. markmb

    markmb Registered

    Joined:
    Sep 16, 2013
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you for your answers. I was able to solve the problem, but I don't know exactly how. I changed some files, which didn't work, and then I undid the changes, and it worked. So it's solved, but I don't know how.

    Thank you anyway!
     
  6. crawford

    crawford Registered

    Joined:
    Sep 21, 2013
    Messages:
    0
    Likes Received:
    0
    Trophy Points:
    0
    cPanel Access Level:
    Website Owner
    I am also facing the same issue.My website is in PHP.I have display the errors OFF with php ini settings but my hosting server is still displaying errors.any body help me???

     
  7. simonas

    simonas Well-Known Member

    Joined:
    Apr 21, 2013
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lithuania
    cPanel Access Level:
    Root Administrator
    I will repeat myself.

    If scripts contains directive which enables error showing, it will show errors.

    Search applications for ini_set('display_errors', '1') or similar.

    Best option would be to solve them instead hiding.

    Another option would be to set error reporting level to 0, like: error_reporting(0);
     
  8. Aaron.Edwards

    Aaron.Edwards Active Member

    Joined:
    Sep 21, 2013
    Messages:
    36
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Can you post the actual error from the error log ?
     
Loading...

Share This Page