ID:               31343
 User updated by:  iam_simon at hotmail dot com
 Reported By:      iam_simon at hotmail dot com
 Status:           Open
 Bug Type:         MSSQL related
 Operating System: Windows 2000 with Apache 1.3.33
 PHP Version:      5.0.3
 New Comment:

I tried swapping my 5.0.3 dll with 5.0.2 php_mssql.dll in c:\php\ext,
but my Apache didn't start. It said "unable to initialize module... "
error.  Any workaround for Php 5.0.3?  or did I do something stupid?


Previous Comments:
------------------------------------------------------------------------

[2004-12-31 04:10:46] jlim at phplens dot com

Josh Berkus says this is the problem:

FIXED!!!!!!

The problem is in the latest implementation of the php_mssql.dll
library for PHP >=4.3.10

A bug tracker request has been submitted. For now, the thing to do is
swap out the 4.3.10 php_mssql.dll for 4.3.9 or earlier. I am using the
dll from 4.3.7 and it works. According to the bug tracker, the last
version it worked in was 4.3.9

http://phplens.com/lens/lensforum/msgs.php?id=11403&x=1

------------------------------------------------------------------------

[2004-12-30 20:23:24] liang at saga-city dot com

We have the same problem, 
even after adding the "include files". 
The error shows  "SQL Execute failed" ,
but it actually works and success.

------------------------------------------------------------------------

[2004-12-30 05:31:23] iam_simon at hotmail dot com

You need to include() both of the following files from ADODB package:

adodb.inc.php
adodb-errorhandler.inc.php  

The variable $s in "adodb-errorhandler.inc.php" contains the error
message.

------------------------------------------------------------------------

[2004-12-30 05:24:28] iam_simon at hotmail dot com

Description:
------------
I have been using ADODB (a pouplar PHP database wrapper) for several
years and recently I upgraded to PHP 5.0.3 on Apache 1.3.33 with MSSQL.
I got tons error messages from log generated by
adodb-errorhandler.inc.php whenever my app uses "INSERT" or "UPDATE" to
the database. There is no problem with "SELECT" statement.

This is a problem with PHP 5.0.3 only,  5.0.2, 4.0.x or below doesn't
have this problem. 

I contacted author of ADODB, Mr. John Lim said it is a MSSQL/PHP bug,
so I am trying to report this bug here.

Although there is an error, but the row has successfully inserted into
the database.  I am using latest version of Adodb. 


Simon

Reproduce code:
---------------
$conn = &ADONewConnection('mssql'); 
$conn->Connect("hostname", "user", "pass", "dbname"); 
$conn->Execute("INSERT INTO visitor_log(date_stamp, ip, host, agent)
Values('2004-12-29 07:10:52PM', '192.168.0.2', '', 'Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)')"); 
$conn->Close(); 

Expected result:
----------------
mssql error: [0: ] in EXECUTE("INSERT INTO visitor_log(date_stamp, ip,
host, agent) Values('2004-12-29 06:59:18PM', '192.168.0.2', '',
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR
1.1.4322)')")

Actual result:
--------------
no error should be seen


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31343&edit=1

Reply via email to