Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 09-07-2003, 06:51 PM   #1
Registered: Jul 2003
Location: Lisbon, Portugal
Distribution: Red Hat 9.0
Posts: 30

Rep: Reputation: 15
PHP ./configure command dilema (for mysql)

Hi all,

I am at a loss for what to do here. I have downloaded MySQL 4.0 binary and PHP 4.x source
and installed Mysql without any trouble but now I want to compile php to talk to MySQL with the following configure command (--with-mysql=<see path below>). However I constantly get the reference to a header file (I assume is mysql.h ) after the configure hicups... what am I doing wrong ? I have listed my inputs below...and my mysql.h paths below (the other one did not work either).

I installed mysql binary from /usr/local/mysql
and my php source compile from /usr/local/php with the following command....

./configure --with-xml --with-curl=/usr/bin --with-pspell=/usr/share/pspell --with-postgresql=shared --enable-shared-pdflib --enable-track-vars --enable-magic-quotes --with-gd=shared,/usr/lib --enable-safe-mode --with-exec-dir=/usr/bin --with-openssl --enable-ftp --with-mysql=/usr/local/php/php-4.3.3/ext/mysql/libmysql/mysql.h
after a long listing of output ....i get the following...

configure: error: Cannot find MySQL header files under /usr/local/php/php-4.3.3/ext/mysql/libmysql/mysql.h

My mysql.h paths are:
[root@localhost php-4.3.3]# find / -name "mysql.h"

PS: i deleted the config.cache file and still had problems...
Old 09-08-2003, 01:57 PM   #2
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
I don't think you need the file name - ie use:
Old 11-03-2003, 09:26 PM   #3
LQ Newbie
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
I had a similar issue when trying to install PHP for Apache2 on Red Hat. I had installed MySQL using the rpms. When I tried to run the configure command for my setup - ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql - I got the same error as you: "... Can't find MySQL header files under yes ..."

My problem was that I had only installed the server and client rpms To get the PHP configure script to recognize MySQL properly, I had to also download the libraries and header files rpm ("MySQL-devel-*"). That solved all my problems.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apache 2, php 5 and mysql 5 install and configure librano Linux - Enterprise 3 11-13-2005 05:52 AM
MySQL setup stops at command "./configure --prefix=/usr/local/mysql" k41184 Linux - Software 1 05-20-2004 02:44 PM
Newbie Linux/Apache/SSL/MySQL/PHP Instalation Dilema rojow Linux - Software 12 10-24-2003 04:48 AM
Configure Apache, PHP and MySQL on RedHat 9.0 siripr Linux - Newbie 2 10-21-2003 02:35 PM
How do i configure RH-9, apache 2.0, php and mysql rolling_titan Linux - General 4 10-18-2003 06:56 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration