Reply to Re: PHP & Apache

Your name:

Reply:


Posted by David on 07/07/06 01:25

On Fri, 07 Jul 2006 01:44:03 +0100, Joaquim Amado Lopes
<jal-2005@jalopes.net.nospam> wrote:

>Greetings.
>
>On Mon, 30 Jan 2006 20:58:45 +0100, "J.O. Aho" <user@example.net>
>wrote:
>>
>>Lawrence Traub wrote:
>>> Thanks. I think I should have given more information.I'm using PHP 5.x and
>>> Apache 1.x because that is what the book I am using uses. At the current
>>> time I am trying to get them to work on a Windows XP system, but will
>>> probably need to move to Linux later on. Do you know of another website that
>>> could help me out?
>>
>>I'm not much into microsoft, but I guess you can have some help of
>>http://www.webmasterstop.com/48.html
>>
>>It includes MySQL too, which is quite useful when making dynamic pages.
>>There should be some already made packages for microsoft that does include
>>apache/php/mysql already configured to be used together, but as I never used
>>those I can't remember the names even if they have been many time written here.
>>
>I followed all the procedures and, as far as I can tell, Apache, PHP
>and MySQL are working fine.
>Installed MySQL Administrator and MySQL Query Browser and both access
>the MySQL databases with the username and password I provide.
>
>But can't get phpMyAdmin to work. It alwys returns the error:
>#1251 - Client does not support authentication protocol requested by
>server; consider upgrading MySQL client
>
>From the config.inc.php file:
>$cfg['Servers'][$i]['host'] = 'localhost';
>$cfg['Servers'][$i]['port'] = '';
>$cfg['Servers'][$i]['socket'] = '';
>$cfg['Servers'][$i]['connect_type'] = 'tcp';
>$cfg['Servers'][$i]['extension'] = 'mysql';
>$cfg['Servers'][$i]['compress'] = FALSE;
>$cfg['Servers'][$i]['controluser'] = '';
>$cfg['Servers'][$i]['controlpass'] = '';
>$cfg['Servers'][$i]['auth_type'] = 'config';
>$cfg['Servers'][$i]['user'] = 'root';
>$cfg['Servers'][$i]['password'] = 'password';
>
>The user and password are the same I use with MySQL Administrator and
>MySQL Query Browser.
>
>The versions are:
>Apache 2.0.58
>MySQL 4.1.20
>PHP 4.3.10
>MySQL Administrator 1.1.9
>MySQL Query Browser 1.1.20
>phpMyAdmin 2.64
>
>Can anyone help me to solve this, please?

From the MySQL website:

A.2.3. Client does not support authentication protocol

MySQL 5.0 uses an authentication protocol based on a password hashing
algorithm that is incompatible with that used by older (pre-4.1)
clients. If you upgrade the server from 4.0, attempts to connect to it
with an older client may fail with the following message:

shell> mysql
Client does not support authentication protocol requested
by server; consider upgrading MySQL client

To solve this problem, you should use one of the following approaches:

*

Upgrade all client programs to use a 4.1.1 or newer client
library.
*

When connecting to the server with a pre-4.1 client program, use
an account that still has a pre-4.1-style password.
*

Reset the password to pre-4.1 style for each user that needs to
use a pre-4.1 client program. This can be done using the SET PASSWORD
statement and the OLD_PASSWORD() function:

mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

Alternatively, use UPDATE and FLUSH PRIVILEGES:

mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
-> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES;

Substitute the password you want to use for “newpwd” in the
preceding examples. MySQL cannot tell you what the original password
was, so you'll need to pick a new one.
*

Tell the server to use the older password hashing algorithm:
1.

Start mysqld with the --old-passwords option.
2.

Assign an old-format password to each account that has had
its password updated to the longer 4.1 format. You can identify these
accounts with the following query:

mysql> SELECT Host, User, Password FROM mysql.user
-> WHERE LENGTH(Password) > 16;

For each account record displayed by the query, use the
Host and User values and assign a password using the OLD_PASSWORD()
function and either SET PASSWORD or UPDATE, as described earlier.

Note: In older versions of PHP, the mysql extension does not support
the authentication protocol in MySQL 4.1.1 and higher. This is true
regardless of the PHP version being used. If you wish to use the mysql
extension with MySQL 4.1 or newer, you may need to follow one of the
options discussed above for configuring MySQL to work with old
clients. The mysqli extension (stands for "MySQL, Improved"; added in
PHP 5) is compatible with the improved password hashing employed in
MySQL 4.1 and higher, and no special configuration of MySQL need be
done to use this MySQL client library. For more information about the
mysqli extension, see http://php.net/mysqli.

It may also be possible to compile the older mysql extension against
the new MySQL client library. This is beyond the scope of this Manual;
consult the PHP documentation for more information. You also be able
to obtain assistance with these issues in our MySQL with PHP forum.

For additional background on password hashing and authentication, see
Section 5.8.9, “Password Hashing as of MySQL 4.1”.

I am running PHP5 with MySQL 5.0 and am using the mysqli libraries.
This cleared up all problems concerning this error. You need to be
sure to move libmysqli.dll to your /windows/system32 directory,
though, or you will encounter a problem with apache not finding the
library.

>Thank you,
>Joaquim Amado Lopes

David

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация