I recently set up Apache, PHP and MySQL on my Windows XP Professional with SP1 and I'm having a bit of trouble. Here's what has happened so far:
Installed Apache 2.0.45 via a MSI package, PHP 4.3.1 via the Win32 zip file and MySQL 4.0.12.
Before I installed MySQL, I installed Apache and PHP, configured them both and tested them and they seemed to work (a few print();'s and echo's worked out). I then installed MySQL, ran mysqld-nt.exe and attempted to create and access a database, which worked, but only once. After that I got HTTP 500 errors on pages without MySQL access on them and when I tried to open a page with MySQL access on it, it got stuck in limbo and didn't return anything for about 5 minutes (server timeout, I believe). Here's the code I used for the MySQL test...
After it stopped working the first time, I restarted my computer and opened that page again. The same thing happened, except this time I was allowed to access other pages without getting a HTTP 500 error.
Question
Slayer
I recently set up Apache, PHP and MySQL on my Windows XP Professional with SP1 and I'm having a bit of trouble. Here's what has happened so far:
Installed Apache 2.0.45 via a MSI package, PHP 4.3.1 via the Win32 zip file and MySQL 4.0.12.
Before I installed MySQL, I installed Apache and PHP, configured them both and tested them and they seemed to work (a few print();'s and echo's worked out). I then installed MySQL, ran mysqld-nt.exe and attempted to create and access a database, which worked, but only once. After that I got HTTP 500 errors on pages without MySQL access on them and when I tried to open a page with MySQL access on it, it got stuck in limbo and didn't return anything for about 5 minutes (server timeout, I believe). Here's the code I used for the MySQL test...
<?
//establish user connection
mysql_connect("localhost");
//open up database
mysql_create_db("testdatabase");
mysql_select_db("testdatabase");
//create table
mysql_query("CREATE TABLE newone2(firstName VARCHAR(25),lastName VARCHAR(25))");
mysql_query ("INSERT INTO newone2 (firstName, lastName) VALUES ('John', 'Smith')");
//display the information
$result = mysql_query ("SELECT * FROM newone2");
while($row = mysql_fetch_array($result))
{
print ("Added record: " . $row["firstName"]." ".$row["lastName"]." <br>\n");
}
//close user connection
mysql_close();
?>
After it stopped working the first time, I restarted my computer and opened that page again. The same thing happened, except this time I was allowed to access other pages without getting a HTTP 500 error.
This page isn't working, but this one is.
Any suggestions would be greatly appreciated.
Slayer
Link to comment
Share on other sites
0 answers to this question
Recommended Posts