#30224 [Opn->Csd]: Sybase module complains that date strings are not null terminated
| From: | iliaa@php.net | Date: | Tue, 28 Sep 2004 14:09:16 +0000 |
| Subject: | #30224 [Opn->Csd]: Sybase module complains that date strings are not null terminated | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-66802@lists.php.net to get a copy of this message | ||
ID: 30224
Updated by: iliaa@php.net
Reported By: tyler at nas dot net
-Status: Open
+Status: Closed
Bug Type: Sybase (dblib) related
Operating System: Redhat 9
PHP Version: 4.3.8
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-09-24 23:18:13] tyler at nas dot net
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 this bug report at http://bugs.php.net/?id=30224&edit=1