Deak Posted December 5, 2007 Share Posted December 5, 2007 I'm posting this here, since I believe it to be a setup/configuration issue on my local machine with PHP or Apache. Not sure which. I have a simple PHP script to test database connectivity: <?php $username = "username"; $password = "password"; $hostname = "localhost"; $dbh = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL"); print "Connected to MySQL"; mysql_close($dbh); ?> This runs fine via the command line, however when it's run via my local Apache webserver I get a connection timeout. If I run other PHP scripts, e.g. phpinfo(), they work fine. It seems to be when I try and do MySQL stuff. I've checked php.ini and I believe I am loading the right extensions and I think httpd.conf is setup okay: extension_dir = c:/php/ext (which is right on my machine) extension=php_mysql.dll is uncommented I am currently running Apache/2.0.61 (Win32) PHP/5.2.5 on Windows XP Pro. I have tried the latest build of Apache/PHP (2.2.6 and 5.2.5) but still no joy. What initially caused my concern, before this basic testing, was trying to do an install of CMS Made Simple. One of the setup pages goes off and makes the database tables necessary, however, when it ran it actually caused Apache to crash. My first line of investigation was CMS Made Simple, but my testing now confirms this is a PHP/Apache problem. From those crashes, the Windows error dialogue box said: szAppName : Apache.exe szAppVer : 2.0.61.200 szModName : php5ts.dll szModVer : 5.2.5.5 offset : 0000ab4a And Apache's log said: [Tue Dec 04 16:57:56 2007] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Tue Dec 04 16:57:56 2007] [notice] Apache/2.0.61 (Win32) PHP/5.2.5 configured -- resuming normal operations [Tue Dec 04 16:57:56 2007] [notice] Server built: Sep 5 2007 09:55:35 [Tue Dec 04 16:57:56 2007] [notice] Parent: Created child process 1384 [Tue Dec 04 16:57:57 2007] [notice] Child 1384: Child process is running [Tue Dec 04 16:57:57 2007] [notice] Child 1384: Acquired the start mutex. [Tue Dec 04 16:57:57 2007] [notice] Child 1384: Starting 250 worker threads. I'm tearing my hair out here! Does anyone have any ideas? Many thanks. Quote Link to comment Share on other sites More sharing options...
Deak Posted December 5, 2007 Author Share Posted December 5, 2007 Update: Firefox was causing the page timeout by replacing the http://localhost:8080/blahblahblah with http://www.locahost.com:8080/blahblahblah. Having corrected the URL, it is now crashing Apache as it was before and throwing the same errors as above with my CMS Made Simple install issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.