I am in a trouble, and i cannot fix the problem. In my php.ini file
extension=php_ming.dll
extension=php_mssql.dll
extension=php_msql.dll
extension=php_mysql.dll
are enabled. but when i try to connect to database writing mysql_connect the browser displays the followinf error:Fatal error: Call to undefined function mysql_connect() in D:\server\www\msql.php on line 2. And when i open phpinfo, it doesnt show any mysql information. I use php5 and MySQL 4.1.
Any help is appreciated
OS is Windows 2000, Server Apache in one computer, in another Windows XP, Server ISP, the PHP code is as follows:
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}if (mysql_query("CREATE DATABASE my_db",$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}mysql_close($con);
?>
in your post. The fact that you received a PHP error message is a good sign. Wherever your script is running, you have, by definition, a PHP-capable server in operation.
Check your path information in your php.ini and make sure that php_mysql.dll is where it's supposed to be.
I reinstalled everything, now i get the following error:
Warning: mysql_connect() [function.mysql-connect]: Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client
I solved this problem, namely i was helped. Download Mysql Query Browser, then run Mysql command line client, enter mysql -p, enter password,the
write set old_passwords=on, try yr php script again it should work.
Bookmarks