From: tyler at nas dot net Operating system: Redhat 9 PHP version: 4.3.8 PHP Bug Type: Sybase (dblib) related Bug description: Sybase module complains that date strings are not null terminated
Description: ------------ I installed a debug version of 4.3.8 to try to diagnose a different problem and I see many error messages like: [client 192.168.1.114] PHP Warning: String is not zero-terminated (Apr 05 2004 12:00AM \x84\xcc\x8f*ZZZZZZZA) (source: /usr/src/php-4.3.8/Zend/zend_execute_API.c:291) in Unknown on line 0, referer: http://(my-url) [client 192.168.1.114] PHP Warning: String is not zero-terminated (Apr 05 2004 12:00AM \x84\xcc\x8f*ZZZZZZZA) (source: /usr/src/php-4.3.8/Zend/zend_execute_API.c:291) in Unknown on line 0, referer: http://(my-url) #1: It isn't very helpful to not print the actual page the error is on. I'm assuming the "Unknown" would be the page, but it's odd that it can print the referrer. #2: I've tracked it down to a page that retrieves marks from a sybase database on another server. Those dates that you see in the above are the dates the student took her tests. #3: These errors only appear in debug mode. #4: With either the debug or the normal php, when I print the string there are no extraneous characters. #5: No extraneous characters appeared and no warning appeared in a perl script that pulled and displayed the same information. #6: My config: ./configure --build=i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --mandir=/usr/share/man --infodir=/usr/share/info --prefix=/usr --with-config-file-path=/etc --disable-debug --disable-rpath --enable-inline-optimization --with-bz2 --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-gd --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-mm --with-openssl --with-expat-dir=/usr --with-zlib --with-layout=GNU --enable-bcmath --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets --enable-sysvsem --enable-sysvshm --enable-track-vars --enable-trans-sid --enable-wddx --without-oci8 --with-mysql=/usr/local/mysql --with-apxs2=/usr/sbin/apxs --with-curl --with-sybase=/usr/local/freetds --with-mcrypt --enable-debug Reproduce code: --------------- $dbsy = startSyb(); // My connection details are hidden here. $select = "SELECT date_completed ". "FROM student_academic"; $handle = $dbsy->prepare($select); $result = $dbsy->execute($handle, array()); while ($row = $result->fetchRow(DB_FETCHMODE_ASSOC)) { } Expected result: ---------------- Nothing, it shouldn't produce any output. Actual result: -------------- Many errors messages like these: Warning: String is not zero-terminated (Apr 05 2004 12:00AM „Ì�*Ì�*) (source: /usr/src/php-4.3.8/Zend/zend_execute_API.c:291) in Unknown on line 0 Warning: String is not zero-terminated (Apr 06 2004 12:00AM „Ì�*Ì�*ZZZZA) (source: /usr/src/php-4.3.8/Zend/zend_execute_API.c:291) in Unknown on line 0 Warning: String is not zero-terminated (May 18 2004 12:00AM „Ì�*Ì�*ZZZZA) (source: /usr/src/php-4.3.8/Zend/zend_execute_API.c:291) in Unknown on line 0 -- Edit bug report at http://bugs.php.net/?id=30224&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30224&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30224&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30224&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30224&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30224&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30224&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30224&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30224&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30224&r=support Expected behavior: http://bugs.php.net/fix.php?id=30224&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30224&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30224&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30224&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30224&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30224&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30224&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30224&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30224&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30224&r=mysqlcfg