php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44918 Application error using MSSQL
Submitted: 2008-05-05 14:55 UTC Modified: 2008-05-13 01:00 UTC
From: ceesios at gmail dot com Assigned:
Status: No Feedback Package: MSSQL related
PHP Version: 4.4.8 OS: Windows XP/2003
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-05-05 14:55 UTC] ceesios at gmail dot com
Description:
------------
I am trying to connect to a MSSQL database. Often the first few times this failes giving an error on the server;
"The instruction at "0x0068d6ff" referenced
memory at 0xffffffff. The memory could not be "read"."

The memory adresses always change. I've tried different PHP versions, different Apache versions and different computers but the problem always comes back. It seems to be connected to the ammount of code/size of the query. The more code or the larger the query the more errors I get.

Sometimes it works after a couple of refreshes but the problem always comes back.

Reproduce code:
---------------
<?php

include '..\dbcon.php'; // connect to database

$todays_date = date("Y-m-d"); 
$todays_date = $todays_date.' '; 
$today = strtotime($todays_date);

$query = " SELECT * FROM AddonScheduleCheck ORDER BY starttijd";

$result = mssql_query($query);
$numRows = mssql_num_rows($result);
echo "<table>\n"
	. "<TR HEIGHT='20'></TR>\n"
	. "<TR class='toprow'><TD>\n"
	. "<H2>" . $numRows . " verkeerd" . ($numRows == 1 ? "" : "e") . " roosteritem" . ($numRows == 1 ? "" : "s") . " gevonden " . "</H2>\n"
	. "</TD></TR>\n"
	. "<TR HEIGHT='20'></TR></table>\n";

echo 
	"<table border=4>".
	"<TR class='sub'>\n".
	"<TD width = 120><B>Cursus<BR>Zoeknaam</B></TD>\n".
	"<TD width = 400><B>Cursus Omschrijving</B></TD>\n".
	"<TD width = 500><B>Foutmelding</B></TD>\n".
	"<TD width = 70></TD>\n".
	"</TR>\n";

while($row = mssql_fetch_array($result))
{
	$roostererror=NULL;
	$startdatum = strtotime($row["Startdatum"]);
	$Hoofddocent = $row["HoofdDocentVnaam"].' '.$row["HoofdDocentAnaam"];
	$cursusid = $row["CursusID"];

include 'schedule_error_descriptions.php';

// tekst ipv bits laten zien
	IF ($row["MoederCursus"] == NULL) {$moedercursus='Ja';}
	ELSE $moedercursus='Nee';

 	IF ($row["DatumAnnulering"] == NULL) {$geannuleerd='Nee';}
	ELSE $geannuleerd='Ja';

echo 
	"<TR class='data'>\n".
	"<TD>". $row["Zoeknaam"] . "</TD>\n".
	"<TD>". $row["CursusOmschrijving"] . "</TD>\n".
	"<TD>".	$roostererror . "</TD>\n".
	"<TD ALIGN=center>".	
		"<BR><FORM NAME=\"roostercontrole\" ACTION=schedule_error_details.php?id=$cursusid METHOD=post>" . 
			'<input type="submit" value="Details">' . 
		'</FORM>' . 
	"</TD>\n".
	"</TR>\n";
	
}

//echo "</table>\n\n";

?>

Expected result:
----------------
a table with the rows from the database and a detail button on the end.

Actual result:
--------------
error on the server;
"The instruction at "0x0068d6ff" referenced
memory at 0xffffffff. The memory could not be "read"."

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-05 15:07 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2008-05-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, 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: Fri Apr 19 14:01:30 2024 UTC