ID: 42584
User updated by: miracle dot rpz at gmail dot com
Reported By: miracle dot rpz at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: MSSQL related
Operating System: Any
-PHP Version: 5.2.4
+PHP Version: 4.4.7 & 5.2.4
New Comment:
Yes, this actual result from cli. Throw mod_php this code output
"hello" three times, but fopen('nonexisten.file','r'); #trigger error
handler only once.
<?php
function error_handler() {
die ('Hello World'.PHP_EOL);
}
set_error_handler('error_handler');
mssql_connect('correct','mssql','dsn'); #connect successfull
mssql_select_db('NONEXISTEN'); # trigger_error
?>
after output 'Hello world' - program hung-up (mod_php & cli)
Previous Comments:
------------------------------------------------------------------------
[2007-09-07 11:05:54] [EMAIL PROTECTED]
Are you running the script on command line? (as there it's perfectly
normal to get all errors twice..)
------------------------------------------------------------------------
[2007-09-07 08:17:04] miracle dot rpz at gmail dot com
Description:
------------
mssql_functions trigger errors twice.
It causes program hang-up if error_handler contains exit-functions
Reproduce code:
---------------
<?php
function error_handler() {
print ('Hello World'.PHP_EOL);
}
set_error_handler('error_handler');
mssql_select_db('NONEXISTEN'); #or any mssql_* func
?>
Expected result:
----------------
Hello World
Actual result:
--------------
Hello World
Hello World
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42584&edit=1