php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19916 PHP hangs after querying certain MSSQL data
Submitted: 2002-10-15 08:39 UTC Modified: 2003-01-02 01:00 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: andreas dot maul at bgr dot de Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 4.2.1 OS: WIN2K prof. SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
37 - 10 = ?
Subscribe to this entry?

 
 [2002-10-15 08:39 UTC] andreas dot maul at bgr dot de
Platform information:
Windows 2000 prof. SP2
IIS 5
MSSQL 7.0 and 2000
PHP 4.1.2 but I assume same behaviour with 4.2.1
according bug report #18271.

Hi,
I have experienced a very strange behaviour querying data from tables in MS SQLServer 7.0 and 2000. Sometimes in a reproducable but statistically way PHP hangs after querying data until IIS throws a timeout similar to bug report #18271.

I have found that this occurs on our system only on tables having columns with float datatypes of different lengths. After altering all columns with real datatypes (4 Bytes) to float (e.g. double precision, 8 Bytes) everything seems to work fine. This bug didn't appear on tables with solely real datatypes alongside with timestamp and varchar etc datatypes or float datatypes accompanied by other char datatypes. 

For completeness I list a part of my script for connecting to the database and doing the query (but there is nothing special with the script):
... some code on top ...
$mpid = $_GET["mpid"];

$hostname = "sql01";
$database = "fis_gp";
$username = "****";
$password = "****";
$con=mssql_connect($hostname,$username,$password) or die("Verbindung zu $hostname konnte nicht hergestellt werden");
mssql_select_db($database, $con) or die("Datenbank $database nicht erreichbar");

$querystr="select M.CODE,                   " // varchar 40
        . "       M.BEZEICHNUNG,            " // varchar 80
        . "       M.GEOGR_LAENGE as LAENGE, " // float 8
        . "       M.GEOGR_BREITE as BREITE, " // float 8
        . "       M.HOEHE_NN,               " // float 8
        . "       M.TK25,                   " // int 4
        . "       M.IN_DATENBANK as IN_DB,  " // bit
        . "       M.DATUM_VON as VON,       " // datetime 8
        . "       M.DATUM_BIS as BIS,       " // datetime 8
        . "       P.ABSOLUTSCHWERE_71 as ABSS,       " // float 8
        . "       P.BOUGUERSCHWERE    as BOUS,       " // real 4
        . "       P.DICHTE_BOUGUERSCHWERE as DICHTE, " // real 4
        . "       K.BEZEICHNUNG as KAMPAGNE,         " // varchar 80
        . "       I.BEZEICHNUNG as INSTITUTION,      " // varchar 80
        . "       A.EINH_NAME                        " // varchar 50
        . "from   ((((GR_Z_MESSPUNKT P                          "
        . "       inner join MESSUNG        M on M.ID=P.MESSUNG_ID)     "
        . "       inner join ADM_EINHEIT    A on A.ID=M.GEBIET_ID)      "
        . "       inner join KAMPAGNE       K on K.ID=M.KAMPAGNE_ID)    "
        . "       inner join INSTITUTION    I on I.ID=K.INSTITUTION_ID) "
        . "where  M.ID = $mpid";

$result=mssql_query($querystr, $con);
$thisrow=mssql_fetch_array($result);
...etc...

Hope this helps to track this bug reported several times.
Andreas Maul

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-08 10:33 UTC] sniper@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


 [2003-01-02 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 Sep 19 23:01:27 2019 UTC