From: dfleury2 at libertysurf dot fr
Operating system: Linux/hpux/win32
PHP version: 4.3.9
PHP Bug Type: Sybase-ct (ctlib) related
Bug description: sybase_unbuffered_query calls
Description:
------------
Two calls to sybase_unbuffered_query core Apache.
To correct the problem before somelse those it
perfectly, I had add a return after
php_sybase_finish_results(result);
/* Forward declaration */
static int php_sybase_finish_results (sybase_result *result);
static void php_free_sybase_result(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
sybase_result *result = (sybase_result *)rsrc->ptr;
/* Check to see if we've read all rows */
if (result->sybase_ptr && result->sybase_ptr->active_result_index) {
if (result->sybase_ptr->cmd) {
ct_cancel(NULL, result->sybase_ptr->cmd, CS_CANCEL_ALL);
}
php_sybase_finish_results(result);
return; // correction
}
_free_sybase_result(result);
}
Reproduce code:
---------------
<?php
$db = sybase_connect( 'LOCALHOST', 'sa', '' );
$query = sybase_unbuffered_query( 'select getdate()' );
$array = sybase_fetch_array( $query );
echo $array[ 0 ];
echo '<br>';
$query = sybase_unbuffered_query( 'select getdate()' );
$array = sybase_fetch_array( $query );
echo $array[ 0 ];
?>
Expected result:
----------------
2-Oct-2004 18:42:50
2-Oct-2004 18:42:50
Actual result:
--------------
Core dump
--
Edit bug report at http://bugs.php.net/?id=30312&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30312&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30312&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30312&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30312&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30312&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30312&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30312&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30312&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30312&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30312&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30312&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30312&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30312&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30312&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30312&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30312&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30312&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30312&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30312&r=mysqlcfg