ID: 47059
Updated by: [email protected]
Reported By: brian at alternate-zone dot com
-Status: Open
+Status: Feedback
Bug Type: Reproducible crash
Operating System: Windows XP
PHP Version: 5.2.8
New Comment:
Which PHP binaries do you use and which mysql DLL?
Previous Comments:
------------------------------------------------------------------------
[2009-01-10 00:36:28] brian at alternate-zone dot com
Description:
------------
when I try to make a connection to the database Mysql the Apache HTTP
server crashes.
szAppName: httpd.exe szAppVer: 2.2.11.0 szModName: php5ts.dll
szModVerL 5.2.8.8 offset: 00009fe6
Reproduce code:
---------------
<?php
# Define MySQL Settings
define("MYSQL_HOST", "localhost");
define("MYSQL_USER", "root");
define("MYSQL_PASS", "password");
define("MYSQL_DB", "test");
$conn = mysql_connect("".MYSQL_HOST."", "".MYSQL_USER."",
"".MYSQL_PASS."") or die(mysql_error());
mysql_select_db("".MYSQL_DB."",$conn) or die(mysql_error());
$sql = "SELECT * FROM test";
$res = mysql_query($sql);
while ($field = mysql_fetch_array($res))
{
$id = $field['id'];
$name = $field['name'];
echo 'ID: ' . $field['id'] . '<br />';
echo 'Name: ' . $field['name'] . '<br /><br />';
}
?>
Expected result:
----------------
ID: 1
Name: John
Actual result:
--------------
Apache HTTP Server has encountered a problem and needs to close
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47059&edit=1