LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Cannot compile PHP4 on RHEL5, 'mysql headers not found' (https://www.linuxquestions.org/questions/linux-server-73/cannot-compile-php4-on-rhel5-mysql-headers-not-found-700251/)

lefty.crupps 01-27-2009 11:24 AM

Cannot compile PHP4 on RHEL5, 'mysql headers not found'
 
NOTE: Thread is SOLVED, see last post.

Trying to migrate our current older RH box to a new install, but we require Apache2 and PHP4 for whatever reason with the way the sites etc are set up. MySQL and other software is OK'd to be newest release.

I was able to install from source the Apache2.0 without issues. However, I cannot compile successfully the PHP 4.4.9. Anyone able to assist me? I've been all over the web looking for prebuild binaries but not having much luck. My mysql-devel packages are installed.

I've tried changing the --with-mysql=/usr/include/mysql part (to point elsewhere) but its not been successful either.


Code:

[root@machine php-4.4.9]# yum install mysql-devel mysql
Loaded plugins: dellsysidplugin, rhnplugin, security
Setting up Install Process
Parsing package install arguments
Package mysql-devel-5.0.45-7.el5.i386 already installed and latest version
Package mysql-5.0.45-7.el5.i386 already installed and latest version
Nothing to do

[root@machine php-4.4.9]# ./configure –prefix=/usr/local/php_4.4.9/ –with-apxs2=/usr/local/apache_2.0.63/bin/apxs –with-mysql=/usr/include/mysql –with-gd –with-jpeg-dir=/usr/lib –with-curl –with-openssl –with-zlib –enable-sockets –enable-memory-limit –with-dom –with-dom-xslt –with-dom-exslt –with-ncurses –enable-dbx –enable-dio –enable-experimental-zts –enable-ftp





checking for int8… no
checking base type of last arg to accept… socklen_t
checking return type of qsort… void
configure: error: Cannot find MySQL header files under /usr/include/mysql

[root@machine php-4.4.9]#


bathory 01-27-2009 04:53 PM

Change "–with-mysql=/usr/include/mysql" to just "–with-mysql=/usr" and see if that helps.

Regards

lefty.crupps 01-28-2009 12:12 PM

It works now, thanks a lot!!
 
I swear that I had tried that, but I got no complaints this round, so thank you very much, bathory!!

For future viewers, it was indeed needed to change the configure to read like this (below); I also had to make clean before it would rerun make:



Code:

cd /usr/src/misc/php-4.4.9

make clean

./configure  --prefix=/usr/local/php_4.4.9/ --with-apxs2=/usr/local/apache_2.0.63/bin/apxs --with-mysql=/usr --with-gd --with-jpeg-dir=/usr/lib --with-curl --with-openssl --with-zlib --enable-sockets --enable-memory-limit --with-dom --with-dom-xslt --with-dom-exslt --with-ncurses --enable-dbx --enable-dio --enable-experimental-zts --enable-ftp

make

make install

EDIT: This issue is SOLVED but I don't know how to mark that...


All times are GMT -5. The time now is 06:56 PM.