From: tim at datad dot com Operating system: SuSE 9.2 Pro 2.6.8-24.11-default PHP version: 4.3.10 PHP Bug Type: Sybase (dblib) related Bug description: dblib.c:303: buffer_add_row: Assertion `row_size <= buf->element_size' failed
Description: ------------ I get the following error when I run any stored procedure. The script works fine if you use SQL statements, but sp's die. php: dblib.c:303: buffer_add_row: Assertion `row_size <= buf->element_size' failed. Aborted My PHP Configuration: ./configure \ --with-apache2=../httpd-2.0.53 \ --enable-track-vars \ --enable-magic-quotes \ --enable-discard-path \ --enable-force-cgi-redirect \ --enable-shared \ --enable-sigchild \ --enable-sockets=shared \ --enable-mailparse \ --with-module=so \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-mysql \ --with-gnu-ld \ --with-zlib \ --with-sybase \ --with-tdsver=7.0 \ --with-unixODBC \ --with-dbase \ --with-openssl \ --with-gd \ --with-ttf \ --with-curl \ --with-mcrypt Reproduce code: --------------- <?php $servername = "my-server-here" ; $portnumber = "5000" ; $username = "sa" ; $password = "" ; $database = "master" ; $db = sybase_connect("$servername:$portnumber", "$username", "$password"); sybase_select_db ( "$database" ); $q = sybase_query("exec sp_server_info", $db); # $q = sybase_query("${database}..sp_help", $db); # $q = sybase_query("select * from sysobjects", $db); $syb_num_fields = sybase_num_fields( $q ) ; $syb_num_rows = sybase_num_rows( $q ) ; $row_cnt = 0 ; $field_cnt = 0 ; while($row = sybase_fetch_row($q)) { if ( $row_cnt == 0 ) { for ( $f=1; $f<=$syb_num_fields;$f++) { $info = sybase_fetch_field($q); print "[$info->name]"; if ( $field_cnt == $syb_num_fields ) { print "\n" ; $field_cnt = 0 ; } } print "\n" ; } ++$row_cnt ; $field_cnt = 0 ; while(list($k, $v) = each($row)) { ++$field_cnt; $datum = NULL ; $datum = rtrim ( $v ) ; print "[$datum]" ; if ( $field_cnt == $syb_num_fields ) { print "\n" ; $field_cnt = 0 ; } } } sybase_close ( $db ) ; ?> Expected result: ---------------- I expect it to work! I should see the output of the stored procedure or at least some kind of explanation as to why it's failing. Actual result: -------------- the bug. -- Edit bug report at http://bugs.php.net/?id=31990&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31990&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31990&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31990&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=31990&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=31990&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=31990&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=31990&r=needscript Try newer version: http://bugs.php.net/fix.php?id=31990&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=31990&r=support Expected behavior: http://bugs.php.net/fix.php?id=31990&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=31990&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=31990&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=31990&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31990&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=31990&r=dst IIS Stability: http://bugs.php.net/fix.php?id=31990&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=31990&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=31990&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=31990&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=31990&r=mysqlcfg