ID: 15192 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]