|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-01-31 14:33 UTC] jani@php.net
[2010-01-31 16:25 UTC] other dot pouya at gmail dot com
[2010-02-08 01:00 UTC] php-bugs at lists dot php dot net
[2010-02-28 15:05 UTC] apaleftos at gmail dot com
[2010-02-28 16:25 UTC] pajoye@php.net
[2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ Dear PHP team I have apache 2.2.14 , php 5.2.12 and mysql 5.1 running on XP. Php and apache are fine when I test phpinfo() or other php commands which are not related to mysql. But when I try to connect to mysql, the apache sever crashes and the following error pops up: Apache HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience. clicking for details I have this error signature: szAppName : httpd.exe szAppVer : 2.2.14.0 szModName : php5ts.dll szModVer : 5.2.12.12 offset : 0000ac6a I ran the code step by step, and I realize the problem is related to the line $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); This is apache error.log after clicking "don't send" on the crashing pop-up: [Sun Jan 31 04:03:57 2010] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Sun Jan 31 04:03:57 2010] [notice] Apache/2.2.14 (Win32) PHP/5.2.12 configured -- resuming normal operations [Sun Jan 31 04:03:57 2010] [notice] Server built: Sep 28 2009 22:41:08 [Sun Jan 31 04:03:57 2010] [notice] Parent: Created child process 584 [Sun Jan 31 04:03:58 2010] [notice] Child 584: Child process is running [Sun Jan 31 04:03:58 2010] [notice] Child 584: Acquired the start mutex. [Sun Jan 31 04:03:58 2010] [notice] Child 584: Starting 64 worker threads. [Sun Jan 31 04:03:58 2010] [notice] Child 584: Starting thread to listen on port 80. Reproduce code: --------------- <?php session_start(); require_once('config.php'); $errmsg_arr = array(); $errflag = false; //so far there was no problem. after this comment it crashes $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$link) { die('Failed to connect to server: ' . mysql_error()); } . . . ?> Expected result: ---------------- Connecting to mysql. Actual result: -------------- Apache HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience. szAppName : httpd.exe szAppVer : 2.2.14.0 szModName : php5ts.dll szModVer : 5.2.12.12 offset : 0000ac6a