#22403 [Opn->Fbk]: PHP crashes when executing a sql procedure without parameters

From: Date: Tue, 25 Feb 2003 21:34:09 +0000
Subject: #22403 [Opn->Fbk]: PHP crashes when executing a sql procedure without parameters
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-34256@lists.php.net to get a copy of this message
 ID:               22403
 Updated by:       iliaa@php.net
 Reported By:      cesararnold at yahoo dot com dot br
-Status:           Open
+Status:           Feedback
 Bug Type:         Sybase-ct (ctlib) related
 Operating System: Win2000
 PHP Version:      4.3.2-dev
 New Comment:

What crashes in particular PHP or Sybase? Given the nature of your
error I could see how the query would fail, which could trigger a crash
in sybase if this particular condition is not handled. However, if that
is the case there is nothing PHP could do to prevent such a thing from
happening.


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

[2003-02-25 02:13:02] sniper@php.net

Assuming this is sybase related..plus correct PHP version.


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

[2003-02-24 15:38:45] cesararnold at yahoo dot com dot br

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 this bug report at http://bugs.php.net/?id=22403&edit=1



Thread (26 messages)

« previous php.bugs (#34256) next »