php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: alex at quad dot com dot ar
New email:
PHP Version: OS:

 

 [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
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-21 16:44 UTC] joey@php.net
Reclassify: MSSQL related (was Sybase CT Related)
 [2001-06-30 15:02 UTC] fmk@php.net
This is not related to the mssql extension. You are using the sybase extension.
 [2001-06-30 20:18 UTC] joey@php.net
#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: Thu Dec 26 19:01:30 2024 UTC