php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18608 PHP configure fails to locate MySQL header
Submitted: 2002-07-27 11:27 UTC Modified: 2002-07-27 12:55 UTC
From: dholeman1 at cox dot net Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.2.1 OS: Redhat Linux 7.3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dholeman1 at cox dot net
New email:
PHP Version: OS:

 

 [2002-07-27 11:27 UTC] dholeman1 at cox dot net
When running configure on the Redhat binary release of PHP 4.2.1 in order to include MySQL support (--with-MySQL=/usr/bin) the configure script fails to look in the specified folder for the MySQL header files and the script dies. The configure script is dedicated to looking only in usr/local and since downstream variables build on the path simply coding in a reference to the correct MySQL path does not work. There is a current php/mysql path patch but that addresses a different, SOCKS related, issue and not this one.

The problem has been noted over the last two years with various earlier releases of PHP and MySQL. There are two current mentions of the problem at http://marc.theaimsgroup.com/?l=php-install&m=101437931602769&w=2 and http://marc.theaimsgroup.com/?l=php-install&m=102239953422754&w=2, plus more if you google about the web. 

Configuring with the mysql directive but without the path uses the built in libraries but results in a warning that if MySQL is to be run as an Apache module the php muct be onfigured using the mysql path and not the default libraries.

Note that removing the MySQL directive, deleting the configure.cache file and rerunning configure results in configure running to completion but with the same warning as above.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-27 11:47 UTC] rasmus@php.net
--with-mysql=/usr/bin ??

PHP will look in path/include and path/lib for what it needs.  You obviously do not have /usr/bin/include and /usr/bin/lib so that path you are providing is bogus.  Simply use --with-mysql=/usr  (assuming of course you have installed the MySQL libs and header files)
 [2002-07-27 12:55 UTC] dholeman1 at cox dot net
Thank you very much. It worked. I followed the MySQL install instructions for the binary distribution so apparently it does not install the library folders where configure expects to find them. Executing rpm -i mysqlrpmfile  put everything in the /usr/bin folder.

I don't know how this works but is it possible that you could tell me how to get the advice you gave incorporated into this document -

http://www.redhat.com/docs/manuals/database/RHDB-7.1.3-Manual/prog/c7614.html#PHP-INST-AP 

which is what I was using for my installation of php. Alternatively it could go in the INSTALL file that goes with the distribution. Such a small thing would help a great deal for the next person, I saw seven instances of this issue mentioned in various places during a google search. Most of them were in the php news group archive.

Thanks again

Don Holeman
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 20:01:32 2025 UTC