LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-01-2010, 07:31 PM   #1
torresr
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Rep: Reputation: 0
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
 
Old 03-02-2010, 02:11 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
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
 
Old 03-03-2010, 08:50 AM   #3
torresr
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 03-03-2010, 09:24 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
php configure: cannot find libmysqlclient neocontrol Linux - Server 10 11-27-2015 06:48 AM
weird PHP compile issue- module shows in "php -m" but not in phpinfo call hbbtstar Linux - Software 1 08-28-2009 03:14 PM
libmysqlclient error when running a php script rose_bud4201 Linux - Software 2 06-03-2005 01:43 PM
libmysqlclient.so.10 Tredo Linux - General 1 11-30-2004 01:05 PM
MySQL and PHP: incompatible libmysqlclient library dciric Linux - Software 1 05-31-2004 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration