Closed Thread
Results 1 to 5 of 5

Thread: PHP display-errors setting.

  1. #1
    thecanadiansandbox18 is offline x10Hosting Member thecanadiansandbox18 is an unknown quantity at this point
    Join Date
    Mar 2011
    Posts
    68

    PHP display-errors setting.

    Hello, I would like to disable php errors from being displayed in a browser when an error is encountered.

    I consulted the PHP help and found this:
    [url]http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-errors[url]

    I noticed in particular this statement from the above link:

    Code:
    This is a feature to support your development and should never be used on production systems (e.g. systems connected to the internet).
    I wish to disable php from displaying errors to the end user. How do I do this? I noticed on the php.net article that it can be done by adding this line to the php.ini file:

    Code:
    ini_set(\'display_errors\', 0);
    Where can I find this php.ini file?

  2. #2
    leafypiggy's Avatar
    leafypiggy is offline Community Advocate leafypiggy is on a distinguished road
    Join Date
    Aug 2007
    Location
    Massachusetts
    Posts
    2,228

    Re: PHP display-errors setting.

    You need to manually set it in your script to display errors...

    Displaying errors is off by default, except for Fatal errors, I believe.

    You could try using ini_set('display_errors', 0); in your PHP script, though I'm pretty sure errors are already off..
    Neil Hanlon | x10Hosting Support Representative
    Neil[at]x10hosting.com
    █ I'm always happy to help. Just ask a question in Free Hosting
    Terms of Service IRC

  3. #3
    thecanadiansandbox18 is offline x10Hosting Member thecanadiansandbox18 is an unknown quantity at this point
    Join Date
    Mar 2011
    Posts
    68

    Re: PHP display-errors setting.

    Where should I put that? I have a common.php file in my phpbb3 forum. Should I put that near the top?

  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: PHP display-errors setting.

    If it is included in all your files, just add the line at the top. You can also use your choice of:

    error_reporting(0); // turns off all error reporting, blank page if it crashes

    error_reporting(E_ERROR); // just fatal errors

    error_reporting(-1); // displays all errors, warning, etc.
    Nothing is always absolutely so.

  5. #5
    thecanadiansandbox18 is offline x10Hosting Member thecanadiansandbox18 is an unknown quantity at this point
    Join Date
    Mar 2011
    Posts
    68

    Re: PHP display-errors setting.

    Thank you, I think that helped.

Closed Thread

Similar Threads

  1. HELP PLEASE: want to have a random quote display
    By catrisit in forum Scripts & 3rd Party Apps
    Replies: 13
    Last Post: 05-31-2011, 06:13 AM
  2. Dolphin Errors
    By CWeb Creative in forum Scripts & 3rd Party Apps
    Replies: 13
    Last Post: 05-27-2011, 12:51 AM
  3. Setting Up Mail Client
    By tjrana0 in forum Free Hosting
    Replies: 1
    Last Post: 05-21-2011, 06:59 PM
  4. still i\'m getting internal errors
    By kaviyadharsan21 in forum Free Hosting
    Replies: 0
    Last Post: 05-18-2011, 10:07 PM
  5. open_basedir errors
    By seanw2354 in forum Free Hosting
    Replies: 0
    Last Post: 05-16-2011, 12:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers