64bit Install of PHP 5.2.0 & MySQL 5.0.18, Awh!!!

This post is meant to be a time saver for anyone else attempting to do a custom compile of PHP 5.2.0 with mysql and mysqli support built in. The systems this setup is being install on are 64bit Pentium machines running Fedora Core 5.
After way too many hours, 30+, of trial and error I found the magic solution, at least in this setup. Basically PHP when doing the configure was looking in the wrong place for the 64bit version of the mysql libraries, mainly libmysqlclient.a. Mysql is installed into /usr/local/mysql and works like a champ. The configure looks for the library in /usr/lib instead of looking in /usr/lib64 as it should considering the –with-libdir=/usr/lib64 was used. To solve this fiasco a simple symbolic link was the answer.

# ln -s /usr/lib64/libmysqlclient.a /usr/lib/mysqlclient.a

After that you should be in good shape for a good compile.

2 Responses to “64bit Install of PHP 5.2.0 & MySQL 5.0.18, Awh!!!”

  1. RCC Says:

    As of php v5.2.10, CentOS 5 & MySQL 5.0.41, the option –with-libdir=/usr/lib64 fixes things with mysqlclient, but the PNG library isn’t found, so use –with-png-dir=/usr/lib64 and PHP will compile up quite nicely.

  2. RR Says:

    With php 5.3.0, MySQL 5.0.45, CentOS 5.3 64-bit libjpeg.so was not found when using –with-libdir=/usr/lib64 despite being available in /usr/lib and in /usr/lib64. Config.log showed that the configure tried to add an extra /usr to the libdir parameter. Using the parameter –with-libdir=lib64 solved the issue.

Leave a Reply