I can't seem to get PHP to recognize MySQL. I know you are probably sick of hearing about this problem, but I haven't been able to find a solution. I have read through the documentation on the web including that which pertains to this error in these forums. I will attempt to outline the problem as detailed as possible:
PHP: 5.2.0RC2-dev
MySQL: 5.0
I am running a very simple test to determine if PHP will recognize MySQL.
Code: Select all
<?php
$conn = mysql_connect($hostname, $username, $password) or die("Unable to Connect to MySQL");
mysql_select_db("myputo", $conn) or die(mysql_error());
print "Connected to MySQL<br />";
mysql_close();
?>And the result is:
Fatal error: Call to undefined function mysql_connect() ...
A snapshot of my phpinfo() can be found at: http://www.salzburgers.com/info.htm
I realize that MySQL is not in my phpinfo() and I am not sure why. extension=php_mysql.dll is uncommented, the correct path has been added to the environmental variable PATH, and php.ini is in C:\Windows and php_mysql.dll is in C:\Windows and C:\Windows\system32 (I read conflicting things).
http://www.salzburgers.com/phpini.htm has my php.ini info. I believe everything with this file is correct. There is one copy which resides on C:\Windows and there are three other files with the same name deep within the Zend Studio directory (one of them is blank, the other two only have a few dll locations for debugging in Zend Studio).
My environmental variables PATH has c:\php5, which is the directory where my php is installed. In the directory c:\php5\ext I have all relevant dll's including, libmysql.dll, libmysqli.dll, php_mysql.dll, and php_mysqli.dll. If I read correctly, the mysql and mysqli are the same file, but I have them both there anyways.
And if there is any other info I can give, pls let me know... I would think it should be as simple as uncommenting php_mysql.dll and making sure to have that in the correct directory.
If anyone could help, I would greatly appreciate it. I have been wasting my time here at work trying to get MySQL to work on my machine
Thank you,
Jason