Bug #15192 Updated: MSSQL functions crashing PHP

From: Date: Thu, 24 Jan 2002 00:57:09 +0000
Subject: Bug #15192 Updated: MSSQL functions crashing PHP
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-77951@lists.php.net to get a copy of this message
ID: 15192 User updated by: sean@castlerock.com Reported By: sean@castlerock.com Status: Open Bug Type: MSSQL related Operating System: Windows 2000 PHP Version: 4.1.1 New Comment: Tried it under 4.0.6 and it crashes as well, switch back to 4.0.5, works just fine. Previous Comments: ------------------------------------------------------------------------ [2002-01-23 19:55:47] sean@castlerock.com This bug happens when requesting a lot (1000+) rows from an MSSQL database or less lines if you've executed a bunch of other code first. My test case was with a table called "data" with three fields: "pt_index(int)","pt_time(datetime)","pt_data(real)" I set the index to 22 for each row, pt_time to each minute of the day, and pt_data to random values. My code was working fine under 4.0.5, but with 4.1.0 and 4.1.1 it generates an application error in php.exe - trying to reference a null pointer. Interestingly, it works fine if I didn't supply the date ranges. Anyways, I searched through the code and saw I was getting the exception in the memory allocation function which means the heap is being corrupted somewhere else. Any ideas on what was added? <?php $link = mssql_connect ("127.0.0.1","","") or die (mssql_get_last_message()); mssql_select_db("TestDB"); $req = "select * from data where pt_index=22 and ". "pt_time >= '2001-12-3' and pt_time < '2001-12-4'"; $data=mssql_query($req, $link) or die (mssql_get_last_message()); while ($row=mssql_fetch_array($data)){ print_r($row); echo "<br>"; } ?> ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=15192&edit=1

« previous php.dev (#77951) next »