ID:               32253
 User updated by:  piotr at clickthinking dot com
 Reported By:      piotr at clickthinking dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         MSSQL related
 Operating System: Windows 2003/2000/XP
 PHP Version:      Irrelevant
 New Comment:

Hi

Could you possibly provide more info on how to set this up as searching
Google brings back very little information. I will try using just the
mssql_ and odbc_ commands and see what it comes back with but adodb is
just a wrapper.

But the FreeTDS extension sounds very promising so instructions on how
to get this up and running would be very appreciated.


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

[2005-03-10 06:52:00] [EMAIL PROTECTED]

It looks like you are using ODBC and not MSSQL functions. Can you
reproduce the same error with native PHP calls (eliminating the ADODB
class)? This would be by using odbc_* or mssql_* functions.

Note the MSSQL library used for the MSSQL extension is not thread safe
and might be causing this probem if you are using mssql_* functions.
There is a new version of the mssql extension available. This is build
using FreeTDS. You could try this version (mssql_* functions are 100%
compatible). The dll is called php_dblib.dll, and it replaces
php_mssql.dll.

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

[2005-03-09 14:41:08] piotr at clickthinking dot com

Description:
------------
I have checked this with PHP 4.3.10, 5.02, 5.03, latest snapshot and
5.0 in combination with Apache 2.0.53 and 1.3.33 (I tried all
combinations). 

While running under Windows 2000, 2003 and XP and trying to connect to
a MSSQL server (on my local machine or a different server) using adodb
4.61 (http://adodb.sourceforge.net) the apache server crashes reporting
php5ts.dll to be the problem (a runtime error dialog box occurs that
when clicked restarts apache). It crashes Apache entirely and apache
stops loading pages until it is reset. There are no error messages in
the apache logs and one has to look in event viewer to see what caused
the problem.

This crash happens randomly, it normally takes 8-10 refreshes of a page
for a crash to occur (sometimes as many as 20 refreshes). It doesn't
matter what page it is as long as the page pulls information from a
MSSQL database.

The same page pulling from the exact same database using MySQL does not
produce any errors and just keeps running.

Reproduce code:
---------------
require_once('adodb/adodb.inc.php');  

global $conn;
$conn =& ADONewConnection('odbc_mssql');    
$conn->SetFetchMode(ADODB_FETCH_BOTH);
$dsn="driver={sql server}; server=localhost; database=arb_db;";
$conn->pconnect($dsn, 'sa', 'ididit');
// Putting pconnect or connect makes no difference"

$sql = "SELECT Desc FROM Tours ORDER BY TourRank";
$rs = $conn->Execute($sql);

Expected result:
----------------
I expect it to pull Desc field from the Tours Table in the arb_db
database.

Actual result:
--------------
Apache crashes in the way described. Apache crashes with a runtime
error dialog and an error is logged under event viewer. 

This occurs on Windows 2003/2000/XP on with PHP 4.3.10, 5.02, 5.03,
latest snapshot and 5.0 in combination with Apache 2.0.53 and 1.3.33 (I
tried all combinations).

MSSQL 2000 and 97 were tried and MySQL 4.1 and 4.0. MySQL worked fine,
MSSQL connection crashsed server. 


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


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

Reply via email to