SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Aug 2013
    Location
    New Zealand
    Posts
    277
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    PHP script dies silently

    I wrote a test script. If I have the following:

    echo "aaa";
    echo $undefined_var;
    echo "bbb";

    Then the script silently dies without errors. The php.ini file has "error_reporting = E_ALL" and "display_errors = On". Any ideas?

  2. #2
    SitePoint Addict
    Join Date
    Aug 2013
    Location
    New Zealand
    Posts
    277
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I figured it out. An earlier 'require' statement had declared an error handler which was swallowing the errors.

  3. #3
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,840
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    If on the off-chance it ever happens again then try this:

    PHP Code:

    echo '<br /> error_reporting() == ' .error_reporting();

    echo 
    '<br /> error_reporting() == ' .error_reporting(-1);

    echo 
    '<br /> ini_get( "display_errors") == ' ini_get"display_errors") ;

    ini_set('error_log'getcwd().'/here-is-my-new-error_log.php');

    die; 
    Last edited by John_Betong; Feb 20, 2014 at 03:48. Reason: formatting
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Patche on earning Member of the Month for July 2014

  4. #4
    SitePoint Addict
    Join Date
    Aug 2013
    Location
    New Zealand
    Posts
    277
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    Ok, thanks, it might be useful to set the error log file which is something I had not considered.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •