I'm using PHP 4.3 and I just upgraded to MySQL 4.1. Now when I try to run my connection script I get this error :

Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in in c:\program files\apache group\apache\htdocs\PHP_Functions . . .

I've been told this is being caused by one of two things. The first one was that my libmysql.dll was out of date. So, I replace that with the one that comes with MySQL 4.1. But that didn't help.

The second issue seems to involve some sort of new hashing function that MySQL 4.0 (and up) now uses. I've tried to sort thru some posts on what to do about that, but none of them make much sense, or are else just C.I.P.U. (clear if previously understood).

So why is my script failing to connect? Here it is :

$conn = mysql_connect("localhost", USER_NAME, PASS_WORD) or die ("Couldn't connect to local host !");

Someone else suggested using mysql_real_connect, but I get an "unknown function" error when I try that.

Upgrades can be a real pain in the ass.

Thanks in advance for any help.

    You need to ensure that your PHP was built against the right library version for your MySQL. That's all there is to it.

    Don't replace DLLs willy-nilly as that's not going to work- it's a compile-time dependency.

    Mark

      MarkR wrote:

      You need to ensure that your PHP was built against the right library version for your MySQL. That's all there is to it.

      Don't replace DLLs willy-nilly as that's not going to work- it's a compile-time dependency.

      Mark

      Well, all I know is what I got, which is PHP 4.3.x. Since it's really just an interpreter how would one go about insuring it's the correct build? How do you compile an interpreter? I don't understand.

        Write a Reply...