Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
apache:building-php-with-mysql-on-centos-5-64bit [2010-06-22 23:10:19] garrett.plasky created |
apache:building-php-with-mysql-on-centos-5-64bit [2011-05-13 23:52:00] garrett.plasky Approved |
||
---|---|---|---|
Line 3: | Line 3: | ||
If you try to build PHP 5.x.x on a 64bit CentOS install you may get this error: | If you try to build PHP 5.x.x on a 64bit CentOS install you may get this error: | ||
- | <code console> | + | <sxh plain> |
- | checking for specified location of the MySQL UNIX socket... no | + | |
checking for MySQL UNIX socket location... / | checking for MySQL UNIX socket location... / | ||
checking for mysql_close in -lmysqlclient... no | checking for mysql_close in -lmysqlclient... no | ||
checking for mysql_error in -lmysqlclient... no | checking for mysql_error in -lmysqlclient... no | ||
- | configure: error: mysql configure failed. Please check config.log for more information. | + | configure: error: mysql configure failed. Please check config.log for more information.</ |
- | </code> | + | |
Looking further into the config.log you will also see: | Looking further into the config.log you will also see: | ||
- | <code console> | + | <sxh plain> |
- | configure: | + | |
configure: | configure: | ||
/ | / | ||
/ | / | ||
/ | / | ||
- | collect2: ld returned 1 exit status | + | collect2: ld returned 1 exit status</sxh> |
- | </code> | + | |
First things first, if you installed MySQL using yum you should make sure that you have the mysql-devel rpms installed. | First things first, if you installed MySQL using yum you should make sure that you have the mysql-devel rpms installed. | ||
- | <code console> | + | <sxh bash>yum install mysql-devel</ |
- | # yum install mysql-devel | + | |
- | </code> | + | |
Once you've ensured that the mysql-devel rpms are installed you need to tell PHP where it should also look for additional libraries. We will pass the following to the configure script: | Once you've ensured that the mysql-devel rpms are installed you need to tell PHP where it should also look for additional libraries. We will pass the following to the configure script: | ||
- | + | <sxh bash> | |
- | <code console> | + | |
- | # ./configure --with-libdir=lib64 --with-mysql | + | |
- | </code> | + | |
That's it, from there you can continue on with the normal build. | That's it, from there you can continue on with the normal build. | ||
{{tag> | {{tag> |