You are not logged in.

#1 2013-04-19 10:34:05

James147
Member
Registered: 2013-04-19
Posts: 2

mysqlnd in php out of date

Hey, I have a php scripts that needs to connect to a mysql database, however whenever it tries it returns the error

PHP Warning:  Creating default object from empty value in /home/james/bin/shellme on line 86
PHP Warning:  mysql_connect(): The server requested authentication method unknown to the client [mysql_old_password] in /home/james/bin/shellme on line 395

This scripts works as it should for every non arch system I have access to.

I can connect to the database fine from the mysql command (mysql  Ver 15.1 Distrib 5.5.30-MariaDB, for Linux (x86_64) using readline 5.1) just not from php.

It appears that php ships with an old version of mysql native drivers:
From phpinfo():

mysql

MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => mysqlnd 5.0.10 - 20111026 - $Id: e707c415db32080b3752b232487a435ee0372157 $

Is there anyway to either update the native driver or use an up to date external driver?

Offline

#2 2013-04-19 12:12:56

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,950
Website

Re: mysqlnd in php out of date

The mysqlnd version is the latest, no problem here. But it seems you are using an old password scheme on the mysql server which is no longer supported by PHP. The solution is to update your password database.

Offline

#3 2013-04-19 12:22:51

James147
Member
Registered: 2013-04-19
Posts: 2

Re: mysqlnd in php out of date

Except that I can connect to the database from the mysql client version 5.5.30 on same box, just not from mysqlnd version 5.0.10 in php on that box. Also on my other boxes that it does work in php reports a much more up to date version of the mysql extension:

mysql

MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => 5.5.29

Offline

Board footer

Powered by FluxBB