|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2002-01-23 19:57 UTC] sean at castlerock dot com
  [2002-10-09 11:36 UTC] iliaa@php.net
  [2002-10-25 01:00 UTC] php-bugs at lists dot php dot net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 04:00:01 2025 UTC | 
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>"; } ?>