|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-12-08 10:33 UTC] sniper@php.net
[2003-01-02 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 05:00:02 2025 UTC |
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