LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   libmysqlclient + php issue (https://www.linuxquestions.org/questions/linux-server-73/libmysqlclient-php-issue-792458/)

torresr 03-01-2010 07:31 PM

libmysqlclient + php issue
 
Hi folks,
I have a server that I need to get back into production its currently running:

(I know its outdated thats half the issue and is being addressed)
Slackware 12.0
PHP 5.2.12

Connecting to a MySQL 5.1.43 backend DB server

Server1 (Apache + authentication services)
Server2 (Mysql DB backend)

we recently updated the backend server to slack 13.0 and mysql 5.1.43 (from 5.0.50) and we've had issues trying to update the libmysqlclient files on server1 to match.

PHP still reports that its running on the 5.0.50 client despite my best efforts.

Example PHPmyadmin says "Your PHP MySQL library version 5.0.51 differs from your MySQL server version 5.1.43. This may cause unpredictable behavior."

There is no package built for slack12 so i'm left with compiling from src which I've tried, I've tried building a full version and just the client but it still isn't updating, I've tried reloading php too but no joy.

Basically I need some help with getting php to pickup on the new version of the lib.

Any help would be greatly appreciated :)
Sincerly,
Sysadmin that just got a duct tape and bubblegum system dropped in his lap

bathory 03-02-2010 02:11 AM

Hi,

You can download the binary mysql-5.1.43, extract it to your server and build php using in ./configure:
Code:

--with-mysql=/path/to/extracted/mysql-5.1.43

torresr 03-03-2010 08:50 AM

Thanks for your help bathory but the issue isn't getting the new libraries its getting PHP to pick up them


ie:

ldd /usr/lib/php/extensions/mysql.so
ldd /usr/lib/php/extensions/mysqli.so

both output

libmysqlclient.so.15 Not Found!

Whereas my new library that was compiled with 5.1.43 is

libmysqlclient.so.16

i've tried creating a symlink at the location of the libraries

libmysqlclient.so.15 -> libmysqlclient.so.16
libemysqlclient.so.15.0.0 > libmysqlclient.so.16.0.0
libmysqlclient_r.so.15 -> libmysqlclient_r.so.16
libemysqlclient_r.so.15.0.0 > libmysqlclient_r.so.16.0.0

and mysqli.so picks up the new files but mysql.so still doesn't

I've made doublely sure that there are no old versions of the library for it to pick up.

Thanks.

bathory 03-03-2010 09:24 AM

Quote:

ldd /usr/lib/php/extensions/mysql.so
ldd /usr/lib/php/extensions/mysqli.so
You don't need the extensions, but you have to build php with mysql support.
So you have to configure php, like
Code:

./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/path/to/extracted/mysql-5.1.43 ...(add other options if you want)
This way you'll build the apach php_module needed amd it will use the correct mysql client version

Cheers


All times are GMT -5. The time now is 08:12 PM.