Building php 5 on redhat 4 64-bit
7:46 PMBuilding PHP 5 on Redhat 4 64-bit
Okay, requirement: build PHP 5.0 on a Redhat 4 64-bit architechure and enable the MySQL module.Step 1: install the RPMS mysql, mysql-devel and perl-DBI using up2date. This will give you the appropriate headers and libraries for compiling-in MySQL support. Note. perl-DBI is a prereq, not that you'll actually be using it with PHP
Problem: MySQL libraries get installed under /usr/lib64 but PHP only looks in /usr/lib
Remember, /lib, /usr/lib and /usr/local/lib are for 32-bit libraries. All 64-bit libraries should be in /lib64, /usr/lib64 and /usr/local/lib64. For this reason, you should not fall to the temptation on creating a 'mysql' symlink in /usr/lib pointing to /usr/lib64/mysql!! If you install pre-built 32-bit binaries that try to dlopen a 64-bit MySQL library - I won't be responsible for the core dumps.
Temporary fix (at least until the PHP developers correct their 64-bit detection logic):
Create a "fake" install of MySQL using 1 directory and 2 symlinks:
<code>
- mkdir /usr/local/mysql64
- cd /usr/local/mysql64
- ln -s /usr/include/mysql include
- ln -s /usr/lib64/mysql lib
</code>
0 comments