From:             cesararnold at yahoo dot com dot br
Operating system: Win2000
PHP version:      4.3.1
PHP Bug Type:     Reproducible crash
Bug description:  PHP crashes when executing a sql procedure without parameters

Hi,

we are using PHP 4.3.2 (latest STABLE version) and found a possible bug
when trying to execute a sql command (a procedure). the procedure needs 1
(one) argument and does not accept null values when is called. 
On our case, the variable $varID was infortunatelly = NULL. after ran the
code we got two strange behaviors:

1) using pear object
$cmd_sql = "exec procedure_name " . $varID;

if (DB::isError($query_proc = $db_conn->query($cmd_sql))) 
{    
        // get the native backend error    
        // and the last query    
        exit($query_proc->getMessage());
}
the system crashes and stops the web server! restarting the web server,
evething restarts to work. 

2) using native functions
like @sybase_query( $cmd_sql, $db_conn );

the system crashes but does NOT stop the web server.

for both cases php gives the message:
"PHP has encountered an Access Violation at 01E436B9"

I know that this can be fixed just sending a non-null value to the
procedure, but PHP could not crash, on my single oppinion.

Is there some fix to this case?
Thanks a lot.
-- 
Edit bug report at http://bugs.php.net/?id=22403&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22403&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22403&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22403&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22403&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22403&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22403&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22403&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22403&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22403&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22403&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22403&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22403&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22403&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22403&r=gnused

Reply via email to