Skip to Content.
Sympa Menu

freetds - Attempting to fix a bug in PHP...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Myers Carpenter" <myers AT fil.org>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Attempting to fix a bug in PHP...
  • Date: Wed, 21 Feb 2001 14:34:57 -0500 (EST)


Hi,

I'm using php4.0.4pl1 on a linux server to talk to a MS SQL 7 sp2 database
using freetds.

Doing any UPDATE query within php show up as failed and kill the connection
to the database, although the database actually does the query. One way
around this is to do something like "UPDATE <blaa, blaa>; SELECT
@@IDENTITY" which results in some data comming back from the database.
Everything works then (I think).

(I've also tried the update query via sqsh, and it works fine, so the bug
is most likely in php)

So basicly when where is no data to be returned php desides the link has
failed and marks it dead.

I went in and recomplied PHP with some debuging printf's PHP calls:

ct_command
ct_send
ct_results

PHP is looking for CS_SUCCEED from ct_results and gets back the int value
of "15" which I think translates back to CS_END_RESULTS (BTW, why arn't
these an ENUM set? Or maybe make the comments in the header file
clearer). Thinking I had the solution I put a check in for CS_END_RESULTS
and if it was true then I ct_cancel'ed the command and returned from the
command, but when running a test script when it got to the query after that
I got

CS_SUCCEED from ct_results(sybase_ptr->cmd, &restype) (ok)
restype is set to 14 (CS_CMD_DONE?)
then I get:
Unknown marker: 115!!
Unknown marker: 116!!

which I found in tds_process_default_tokens in src/tds/token.c

Any thoughts?

myers





  • Attempting to fix a bug in PHP..., Myers Carpenter, 02/21/2001

Archive powered by MHonArc 2.6.24.

Top of Page