1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to make PHP show all errors again?!

Discussion in 'Apache' started by oskare100, Jan 3, 2007.

  1. #1
    Hello,
    Before I changed to my own server PHP always showed all errors, also things like if I had forgotten a ; on one line it told me that something was wrong. Now, it just shows a bland page and I have to go though the whole script or guess.

    I have added;
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    PHP:
    But it doesn't help, it still just shows blank pages when something is wrong. Isn't it possible to change something in the PHP config file or something else to make PHP show all errors?

    Thanks in advance,
    Best Regards
    Oskar R
     
    oskare100, Jan 3, 2007 IP
  2. weknowtheworld

    weknowtheworld Guest

    Messages:
    306
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The following code must help you..

    <?php

    // Turn off all error reporting
    error_reporting(0);

    // Report simple running errors
    error_reporting(E_ERROR | E_WARNING | E_PARSE);

    // Reporting E_NOTICE can be good too (to report uninitialized
    // variables or catch variable name misspellings ...)
    error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

    // Report all errors except E_NOTICE
    // This is the default value set in php.ini
    error_reporting(E_ALL ^ E_NOTICE);

    // Report all PHP errors (bitwise 63 may be used in PHP 3)
    error_reporting(E_ALL);

    // Same as error_reporting(E_ALL);
    ini_set('error_reporting', E_ALL);
     
    weknowtheworld, Jan 5, 2007 IP