|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7881 sybase-ct does not report server errors
Submitted: 2000-11-19 21:39 UTC Modified: 2001-06-30 20:18 UTC
From: alex at quad dot com dot ar Assigned:
Status: Closed Package: Sybase-ct (ctlib) related
PHP Version: 4.0.3pl1 OS: Linux kernel 2.2.16 (debian 2.2)
Private report: No CVE-ID: None
 [2000-11-19 21:39 UTC] alex at quad dot com dot ar
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

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("")}}, 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

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:

$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 :)



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-21 16:44 UTC]
Reclassify: MSSQL related (was Sybase CT Related)
 [2001-06-30 15:02 UTC]
This is not related to the mssql extension. You are using the sybase extension.
 [2001-06-30 20:18 UTC]
#1: Use the MSSQL extension, not Sybase-ct.
#2: Try a newer version of PHP.

Since this bug belongs in neither the sybase-ct
area, nor the mssql, I'm closing it.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 02:01:31 2024 UTC