Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cant find mysql header files 1

Status
Not open for further replies.

Halfcan

Technical User
Dec 8, 2002
214
US
Hi all,

I'm attempting to configure PHP with apache and mysql support, but the config fails, because it can't find the mysql header files.

I have mysql installed and working,
these are the rpms installed:
MySQL-client-4.0.21-0
MySQL-server-4.0.21-0
MySQL-shared-compat-4.0.21-0

When configuring PHP, I'm using this:
[root@tunes mysql]# ./configure --with-apache=../apache_1.3.31 --with-mysql=/usr/bin/mysql

This is the Error:
configure: error: Cannot find MySQL header files under /usr/bin/mysql

When I search for mysql.h, I get this:
[andy@tunes local]$ locate mysql.h
/home/andy/snort/snort-2.2.0/src/win32/WIN32-Includes/mysql/mysql.h
/usr/local/src/php-4.3.9/ext/dbx/dbx_mysql.h
/usr/local/src/php-4.3.9/ext/mysql/php_mysql.h
/usr/local/src/php-4.3.9/ext/mysql/libmysql/mysql.h
/var//var//var/
correct me if I'm wrong, but shouldn't the path be something like /usr/bin/mysql or /usr/lib/mysql or /usr/sbin/mysql ?

I've tried all of these paths and they don't work.

anything to help is greatly appreciated.

Thanks,
HC
 
You are pointing --with-mysql to an incorrect directory. When you do --with-mysql=/usr/bin/mysql, you're telling configure that you want it to use the mysql.h file located in /usr/bin/mysql.... it's not there (doing a locate for it shows that it is not in /usr/bin/mysql).

Use this command:

./configure --with-apache=../apache_1.3.31 --with-mysql

It'll work for you.
 
It works. JJ is the man everyone.
Here's a big fat star....
Thanks,
HC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top