I have used LAMP on my Linux machine for a couple of years and use it to maintain a website.
For various reasons I now also need to maintain this website on a Windows machine and I have just recently installed the latest WAMP.
Just to test things I have set up a temporary database (df6net1) at my host with one table (temp) with one field (temp) containing 'Hello World!'
My test script is:
<head>
<?
function makeXDBConnection() {
$link = mysql_connect('mysql13.streamline.net', 'df6net1', '123456')
or die();
// or die("Couldn't connect to Server."
;
mysql_select_db('df6net1')
or die();
// or die("Couldn't open database"
;
echo("Connected to database 'df6net1'"
;
}
makeXDBConnection();
?>
</head>
<body>
<br />
<?
$result = mysql_query("SELECT temp FROM temp"
;
$row = mysql_fetch_array($result,MYSQL_ASSOC);
extract($row);
echo $temp;
?>
</body>
</html>
Running this in my Linux localhost produces the expected result:
Connected to database 'df6net1'
Hello World!
But running the same script in my Windows localhost produces the following error messages:
Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected in G:\wamp\www\mytest\index.php on line 4
Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication in G:\wamp\www\mytest\index.php on line 4
Any ideas or guidance would be welcome.
Thanks
David
PS I see the Preview shows stupid smiley things where there is supposed to be a closing bracket in the above code!!!