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 how to disable error message

Discussion in 'Security' started by john28uk, Mar 5, 2010.

  1. john28uk

    john28uk Member

    Joined:
    Jul 4, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    I have changed php.ini to display no php errors but they still are being displayed.

    display_errors - off
    display_startup_errors - off

    I have restarted the server and appache but still the same, any ideas?

    Thanks John
     
  2. ChrisRHS

    ChrisRHS Well-Known Member

    Joined:
    Jul 12, 2006
    Messages:
    292
    Likes Received:
    5
    Trophy Points:
    18
    Do you have an .htaccess file that is turning them back on?
     
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    If your PHP type is DSO, then a .htaccess may be turning that back on again.

    Your PHP script may also have an "ini_set" command doing the same.

    The next thing I would check and make sure that you edited the correct PHP.INI file because your script might not be using the default /usr/local/lib location.

    In example, if you have any PHP.INI files in your account and you are using any of the CGI based types of PHP, then that PHP.INI file might be superceeding the system PHP.INI file. In a very similar fashion, if you are using my "custom php settings" addon on your server then the location of you PHP would have been moved to /usr/local/phpconf/<login>

    The reverse of what I said can also be true as well. If you tried to edit the PHP.INI file located in your account but the server is DSO based or custom PHP has been disabled then the settings you changed would never be read and you would need to edit the main server PHP.INI instead.

    To tell which PHP.INI file is being read by your scripts, I would setup a phpinfo() page and take note of the configuration path.

    It should go without saying but any time you make changes to your settings or your web pages, you should clear your web browser cache to insure that what you are seeing is fresh and real. I have seen way too many people spend all day trying to solve a problem only to find out they actually fixed the problem in the first 30 seconds and didn't know it because their web browser kept showing them the problem from cache.

    Hope that helps you out
     
  4. john28uk

    john28uk Member

    Joined:
    Jul 4, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    Thanks for the replies, the htaccess file is not turning them back on, and the script has no function to do this either.

    When I do a phpinfo() the display_errors for both local and master both show off, the file path is /usr/local/lib

    One interesting thing I noticed is the build date states Jun 13 2009 16:51:41 yet I have rebuilt PHP since then

    Any more ideas??

    Thanks John
     
  5. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Solution

    Is it possible for you to provide us phpinfo page URL? so that we can check the php configuration on your serevr and update you with the proper to resolve your issue.
     
  6. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    I am going to go with linux8702 on this ---

    There is not much more we could say outside of my previous post without seeing a phpinfo() screen but with that, we might be able to better track down what is going on with your site.

    Here is a question just per a similar (odd) past experience with a client:

    Are you 100% certain your domain is pointing to where you think it is?

    I once had a client that changed hosting providers and about a year later couldn't figure out why their PHP settings were not changing and neither could their hosting provider and then I took a look and found out that their site was still hosted on their original hosting provider from a year before and they had forgotten to update the domain to the new host. Oops.

    Not saying that is what is necessarily going on here but something to consider when looking at oddities like what you just mentioned.
     
Loading...

Share This Page