|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-01-10 00:38 UTC] pajoye@php.net
[2009-01-10 02:25 UTC] brian at alternate-zone dot com
[2009-01-10 11:08 UTC] pajoye@php.net
[2009-01-15 20:08 UTC] Stan at MComputerSolutions dot com
[2009-01-15 20:09 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 17:00:02 2025 UTC |
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