Click to See Complete Forum and Search --> : MySQL help


mimi83
01-27-2007, 08:36 AM
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

aussie girl
01-27-2007, 08:55 AM
what operating system and what server do you have?

Phill Pafford
01-27-2007, 10:20 AM
Also can you post your code please/

NightShift58
01-27-2007, 11:40 AM
???Also can you post your code please/

Call to undefined function mysql_connect() in D:\server\www\msql.php on line 2.Line 1 is presumably:<?php

mimi83
01-28-2007, 02:50 AM
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);
?>

aussie girl
01-28-2007, 06:39 AM
that pathway to your msql.php doesn't look like it's coming from a server

DimaX
01-28-2007, 09:29 AM
that pathway to your msql.php doesn't look like it's coming from a server. (http://www.searchteens.net). (http://www.searchsport.net). (http://www.doski-games.biz). (http://www.searchgames.biz). (http://www.doski-teens.biz)


Yeah it is true !

mimi83
01-29-2007, 04:06 AM
What does it mean?

NightShift58
01-30-2007, 12:56 AM
It means that no one has seen:D:\server\www\msql.phpin 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.

mimi83
01-30-2007, 01:50 AM
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

NightShift58
01-30-2007, 01:55 AM
It looks like at least now, you've got mysql running within PHP.

I'm in over my head at this point. Maybe someone else can help. You may have better (or quicker) luck by posting in the SQL forum.

NightShift58
01-30-2007, 01:59 AM
Take a look at: http://dev.mysql.com/doc/refman/5.0/en/old-client.html
You may see something there that will get you back on track.

mimi83
02-01-2007, 07:14 AM
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.