Hi Team,

I am newbie to PHP. I am in a process of cofiguring the PHP, able to communicate with the MYSQL database. I used the following script to perform that task.

<?php
$con = mysql_connect("localhost:3306","monty","some_pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}// some codemysql_close($con);
?>

But, I am having problems in establishing the connection between PHP and MYSQL. I am getting an HTTP 500 internal server error message when I typed http://localhost/SQL.php.

Please, find the attachment for the error message.

Note: I am using Apache server 2.0.59

Thanks for your assistance in advance.

Cheers,

Krishna.

    That looks as though apache is not serving pages to localhost.

    Might just need to start apache.

    I dont know how you setup your lamp/wamp but if you cannot get apache up and running i would suggest xampp http://www.apachefriends.org/en/xampp.html

    It has all of the latest and greatest as well as a plethora of extensions etc pre packaged and it can be totally standalone on a jump drive if need be.

      You shouldn't be seeing 500 errors... does a simple phpinfo() work? How did you integrate PHP with Apache?

      Also, as to MySQL, you might want to read this post from the sticky in this forum.

        Hi All,

        Thanks for all your suggestion for my problem. As per the mikes suggestion I have installed XAMPP LITE and try to install of my computer. But, I am encountering an problem, which I have attached the screen shot for your reference.

        Could any one suggest me the way out for this problem.

        Cheers,

        Krishna.

          Write a Reply...