bupcguy Posted January 1, 2007 Share Posted January 1, 2007 I have just installed Apache,PHP and MySQL. I have got Apache and PHP working ok together and i am just wondering what is a good test to make sure MySQL is working ok and how do i test to make sure the three programs are all working in sync.I have tried to connect to MySQL and i get this error message ( Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test2.php on line 5 ) This is the script that i ran. <html> <head> <title>MySQL Test</title> </head> <body> <h1> <?php $connection=mysql_connect("localhost","root", "*******") or die("Could not connect to MySQL"); echo "Successfully connected to MySQL"; ?> </h1> </body></html> Thankyou Quote Link to comment Share on other sites More sharing options...
the_oliver Posted January 1, 2007 Share Posted January 1, 2007 Is php compiled with mysql suport?Did you inisiate the mysql database? What OS are you doing this on, it will be possible to test mysql on its own. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted January 1, 2007 Share Posted January 1, 2007 You need to enable the MySQL extension. Please [url=http://www.phpfreaks.com/forums/index.php/topic,95378.0.html]this thread[/url]. It will show you how. 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.