Hello All!
I am new to mysql and php.I tried to connect mysql with php via the following code.But, all i get is an error message HTTP 500 internal server error.
<?php
$conn = mysql_connect("localhost","root","abha") or die(mysql_error());
mysql_select_db("project",$conn);
?>
I am using:-
Php 5.2.8
Apache 2.2.11
Mysql 5.0.67
Operating System - Vista Home edition
Please solve my problem.
Thanks in advance.
Unable to connect mysql via php
Moderator: General Moderators
Re: Unable to connect mysql via php
Usually that means that one of your configuration files is incorrect, either it can't be found (wrong directory) or it doesn't contain correct information needed by your system to work, such as locations of other files, etc. It's almost impossible to tell you what's wrong. How did you install this? Was it a WAMP-like package of Apache/MySQL/PHP or did you install them individually? Have you made any changes to your httpd.conf, PHP.ini or other configuration files?
Re: Unable to connect mysql via php
I installed them individually.It was available on downloads.com.Yes ,I did make some changes as directed by them.
Abha
Abha