php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15632 MSSQL querys cause major problems
Submitted: 2002-02-19 16:37 UTC Modified: 2002-12-23 01:00 UTC
Votes:6
Avg. Score:4.3 ± 1.5
Reproduced:5 of 6 (83.3%)
Same Version:4 (80.0%)
Same OS:5 (100.0%)
From: tyler at coastergames dot net Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 4.1.1 OS: Windows 2000
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2002-02-19 16:37 UTC] tyler at coastergames dot net
Webserver: IIS 5
SQL Server Ver: 2000
CGI version of PHP

Calling mssql_query() causes PHP to hang. It eventually times out. 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-20 06:18 UTC] sander@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".



 [2002-02-20 13:43 UTC] tyler at coastergames dot net
Sorry.

With the above configuration, calls to at least mssql_query(); result in a PHP timeout. PHP apparently continues to run, or at least the webserver thinks it is, and the users browser does not display a new page until PHP times out. Behavior is weird, and an example is perhaps weird.

<?php
mssql_connect("host","user","pass");
echo "Foo!"; #Outputs Foo!

<?php

mssql_connect("host","user","pass");
echo "Foo!"; #Echos nothing apparently
flush(); #Doesn't help;
$q = mssql_query("some query");

The first case works, the 2nd doesn't.
 [2002-02-20 13:45 UTC] tyler at coastergames dot net
Hrmm, can't seem to reopen. The status box only shows 'Bogus'
 [2002-02-20 14:16 UTC] sander@php.net
Reopened.
 [2002-02-20 17:09 UTC] tyler at coastergames dot net
Additonal info: This occurs under apache as well, but I get an internal script error.

The problem occurs when a call to mssql_query matches at least one row. If a query does not match anything, PHP does not crash. But if it does, it crashes.
 [2002-04-20 19:06 UTC] martijn at ideeweb dot nl
I experience the same problem using Apache 1.3.20 on Windows 2000.

The bug shows with mod_php and PHP as CGI (both 4.1.2).

SQL Server 2000 (Dev. Ed.) is installed on the same machine.


Connecting to the server and selecting a database is no problem, but any call to mssql_query() causes PHP to crash. I find no messages in the errorlog (except for a 'Premature end of script headers' with the CGI version).

Interesting is the fact that mssql_query() behaves as expected (no errors) only if the query returns 0 rows.
 [2002-04-20 19:56 UTC] martijn at ideeweb dot nl
After some hasling with the configuration, I have found a solution (for both mod_php and CGI) in setting the mssql.compatability_mode option to 'Off':

mssql.compatability_mode = Off


I also noticed this bugreport, with the same solution:
http://bugs.php.net/bug.php?id=15890
 [2002-12-07 01:52 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-12-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu May 23 09:01:32 2019 UTC