ID:               48402
 User updated by:  aaron dot chmelik at gmail dot com
 Reported By:      aaron dot chmelik at gmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         PHP options/info functions
 Operating System: Mac OSX 10.5.6
 PHP Version:      5.2.9
 New Comment:

Error reporting worked perfect when run in the command line.


Previous Comments:
------------------------------------------------------------------------

[2009-06-02 08:00:03] [email protected]

Try running the same script on command line (using either php-cgi or
php  
CLI binary). Like this:

# php -n test.php


------------------------------------------------------------------------

[2009-05-29 15:15:34] aaron dot chmelik at gmail dot com

display_errors = On
log_errors = Off
also,
error_reporting = E_ALL
error_log = php_errors.log

I changed log_errors to On, restarted Apache, with the same results.
Would also like to mention that my original post should have said "If I
comment out the require line, I get the word "Error" echoed from my
scripted error checking."

Just showing the difference in how fatal and non-fatal errors are being
treated.

I would also like to note that since I've turned on log_errors, nothing
has been logged to the file.

------------------------------------------------------------------------

[2009-05-27 10:09:12] [email protected]

Check your display_errors and error_log settings too.

------------------------------------------------------------------------

[2009-05-27 02:20:03] aaron dot chmelik at gmail dot com

Description:
------------
PHP has ceased reporting any errors. I recently installed the GD libs,
but haven't made any changes to the error reporting in the php.ini file,
any changes to httpd.conf for error reporting or .htaccess at all
(recently). I am running PHP 5.2.9 on Mac OSX 10.5.6 with Apache 2.2.9.
I would provide a URL for replicating the issue, but I am running PHP on
a local system, and am ignoring all outside requests to apache.

I ran phpinfo(), the error_reporting value is 6143 (E_ALL)

Reproduce code:
---------------
<?php

require("dbconnect.php"); //this file does not exist

$test = mysql_query("SELECT * FROM applicants WHERE this = 'test'");
//again, does not exist

if(!$test){
echo "Error";
}

while($testdisp = mysql_fetch_array($test)){
echo $testdisp['this'];
}


?>



Expected result:
----------------
It should give me an error that the file doesn't exist. I have tested
this with a number of errors, both non-fatal and fatal, and have
received NO results

Actual result:
--------------
If I don't comment out the require line, I get the word "Error" echoed
from my scripted error checking. If I don't comment out the require
line, I get a blank page. I don't get any errors from PHP. 


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48402&edit=1

Reply via email to