From:             [EMAIL PROTECTED]
Operating system: WIN2K prof. SP2
PHP version:      4.2.1
PHP Bug Type:     MSSQL related
Bug description:  PHP hangs after querying certain MSSQL data

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
-- 
Edit bug report at http://bugs.php.net/?id=19916&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=19916&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=19916&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=19916&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=19916&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=19916&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=19916&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=19916&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=19916&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=19916&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=19916&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19916&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=19916&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=19916&r=isapi

Reply via email to