MySQL Forums
Forum List  »  PHP

Re: php 5.1.3 (also 5.1.4) ./configure errors with -lmysqlclient :: The solution!
Posted by: Nicholas Poole
Date: July 16, 2006 04:48PM

Last and final update.

Sorry for the delay in getting back to everyone (i'm guessing there are a lot of people who have the same/similar problems).

Well, i have a solution (and this has been tried and tested on both of my linux boxes; Fedora Core 5 and Mandriva 2006). Its not particually clean though. Anyway, here is what i did:

1: Install all 4 .rpms for MySQL (server, cleint, shared libraries and headers)

2: uninstall the shared libraries (this i what i did, so you may want to skip installing in the first place, or not since this should get a working fix, even if it is unessisary)

3: download and compile the MySQL source (with --enable-shared) MAKE ONLY!

4: you'll find the file libmysqlclient.so.15.0.0 in a hidden folder (.lib) under libmysql. copy this to /usr/lib/

5: set up the following sym-links:
ln -s /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so.15
ln -s /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so
ln -s /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/mysql/libmysqlclient.so.15.0.0
ln -s /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/mysql/libmysqlclient.so.15
ln -s /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/mysql/libmysqlclient.so

6: Try to compile php now, if it still fails, install the shared libraries from the rpm again.

7: Compile of php should work now


I'm guessing its the sym-links between /usr/lib and /usr/lib/mysql that are the real solution, but this method works.

The process is a linux ported version of the mac OSX fix found at http://us2.php.net/manual/en/ref.mysqli.php#60654 , I effectivly changed the file extntions to get it to work on linux.

I hope this gets easily found and answers any issues other users may have with the mysqli extentions with php5.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.