php help pleaseeeee!!!!!!!!!!!!!
Hi all very frustrated at the mo and feel like giving up all togetether.
i am totally new to developing in php and have recently started to learn it . i find the language easy enough but configuring it to run on my machine a nightmare.
im using iis5 on win xp pro.
have installed mySql 4.1 .exe basically just clicked on the exe and it installed itself. have created a database in it no probs what so ever works fine.
i downloaded the php .exe and installed that too no probs at all.
have modified the php.ini and placed this in it.
cgi.force_redirect = 0
cgi.redirect_status_env = ENV_VAR_NAME
i also set the path to the extensions and enabled the php_msql.dll
and when i tested a page it works fine .
example <? phpinfo(); ?> .
but when i try anything like connecting to mysql i get the following error.
"Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in D:\php\connect2.php on line 5
A connection to the server could not be established"
code used :
<?php
$hostname = ""; // have plave loaclhost here too and the machine name etc.
$username = "root";
$password = "secret";
$connection = mysql_connect($hostname, $username, $password);
if (!$connection) {
die("A connection to the server could not be established");
} else {
echo "User $username is logged onto the MySQL server, $hostname, successfully";
}
mysql_close($connection);
?>
i dont really want to use one of those bundle packages as i want to use the proper mysql interface etc.
can anyone tell me where im going wrong .
any help greatly appreciated.
|