Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unable to connect via PHP

Status
Not open for further replies.

ShamaJamms

Programmer
Mar 28, 2007
11
HTTP, PHP, and MySQL servers are all running localhost on my machine, and configured/setup. I am able to login and edit MySQL via Windows command prompt. But when I issue a PHP connect command and run the PHP page on my browser, I'm unable to connect.
Here is my code:


<?php
mysql_connect("localhost", "root", "test") or die(mysql_error());
echo "Connected to MySQL";
?>
 
I don't think thats a connection issue with mysql, but rather a PHP configuration issue and as such is better suited for the PHP forum here. forum434

However in anticipation of the guys over their, I'll ask you to do the following and post the results in a thread in the PHP forum.

In a blank file add the following code:
Code:
<?PHP
phpinfo();
?>

Save it, and open it in your browser and post the results.





----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top