|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15192 MSSQL functions crashing PHP
Submitted: 2002-01-23 19:55 UTC Modified: 2002-10-25 01:00 UTC
Avg. Score:3.7 ± 1.9
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: sean at castlerock dot com Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 4.0.6 OS: Windows 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: sean at castlerock dot com
New email:
PHP Version: OS:


 [2002-01-23 19:55 UTC] sean at castlerock dot 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: 

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?  

$link = mssql_connect ("","","") or die (mssql_get_last_message());

$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)){
	echo "<br>";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-23 19:57 UTC] sean at castlerock dot com
Tried it under 4.0.6 and it crashes as well, switch back to 4.0.5, works just fine.
 [2002-10-09 11:36 UTC]
Please try using this CVS snapshot:
For Windows:

 [2002-10-25 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over 2 weeks, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 18:01:32 2024 UTC