PHP 4.0 Bug #7881: sybase-ct does not report server errors
| From: | alex at quad dot com dot ar | Date: | Mon, 20 Nov 2000 02:39:13 +0000 |
| Subject: | PHP 4.0 Bug #7881: sybase-ct does not report server errors | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-38521@lists.php.net to get a copy of this message | ||
From: alex@quad.com.ar
Operating system: Linux kernel 2.2.16 (debian 2.2)
PHP version: 4.0.3pl1
PHP Bug Type: Sybase-ct (ctlib) related
Bug description: sybase-ct does not report server errors
ok, this is my php configure line:
./configure --with-apxs=/www/bin/apxs --with-sybase-ct=/opt/sybase-11.9.2 --enable-track-vars
I've got these 3 packages installed on /opt/sybase-11.9.2
sybase-ase-11.9.2-3.i386.rpm
sybase-common-11.9.2-3.i386.rpm
sybase-openclient-11.1.1-3.i386.rpm
I can query a MSSQL 7.0 server + SP2 applied with no problems, but if I ever misstype a query php
won't report the sql server error and hangs the script forever.
I strace'd apache and here are part of the results:
(the cmd used was: strace -s 128 /www/bin/httpd -X)
connect(6, {sin_family=AF_INET, sin_port=htons(1433),
sin_addr=inet_addr("200.32.xxx.xxx")}}, 16) = 0
ioctl(6, FIONBIO, [1]) = 0
ioctl(6, FIOASYNC, [0]) = 0
setsockopt(6, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
setsockopt(6, IPPROTO_TCP1, [1], 4) = 0
... some more not meaningfull sys calls.....
send(6, "\1\1\0\33\0\0\0\0SELECT foo FROM bar", 27, 0) = 27
recv(6, "\4\1\0?\0\0\0\0\252+\0\320\0\0\0\1\20\32\0Invalid object name
\'bar\'.\5MEGA1\0\1\0\375\2\0\301\0\0\0\0\0", 3072, 0) = 63
alarm(300) = 300
alarm(0) = 300
send(6, "A", 1, MSG_OOB) = 1
recv(6,
as you can see the server reported an "Invalid object name \'bar\'." error
message, but somehow php sends a MSG_OOB after that, and then waits the recv() forever. the browser
keeps waiting until it times out (the browser times out, not php, it even exceeds my
max_execution_time). If I kill apache then the error msg is shown, but otherwise.. it timesout and
nothing is shown.
my php script was:
<?php
$c=mssql_connect($dsn,$user,$pass);
mssql_select_db($db_name);
$r = mssql_query("SELECT foo FROM bar",$c);
$row = mssql_fetch_row($r);
echo $row[0];
?>
hope you guys can help me out on this one :)
Thanks
alex@quad.com.ar
--
Edit Bug report at: http://bugs.php.net/?id=7881&edit=1