php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3949 php with MySQL error
Submitted: 2000-03-28 15:21 UTC Modified: 2001-09-26 19:07 UTC
From: fcgreco at my-deja dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: Earlier? Upgrade first! OS: redhat4.0
Private report: No CVE-ID: None
 [2000-03-28 15:21 UTC] fcgreco at my-deja dot com

 Dear Sr. or Madam;
  
  
 I have installed apache-1.3.6-15cl in my Redhat 4.0, and
 MySQL-3.22.32-1. Now I am trying to compile the PHP3 to work with MySQL, but when I am trying to follow this steps
 in the readme I am receiving an error messages.
  
 This is the steps in the readme :
  
  
 If you are PHP using RPMS, but it doesn't compile with the database support I need! What's going on here?
                       Due to the way PHP is currently built, it is not easy to build a complete flexible PHP RPM. This issue will
 be addressed in
                       PHP4. For PHP, we currently suggest you use the mechanism described in the INSTALL.REDHAT file in
 the PHP
                       distribution. If you insist on using an RPM version of PHP, read on...
                       Currently the RPM packagers are setting up the RPMS to install without database support to simplify
 installations AND                       because RPMS use /usr/ instead of the standard /usr/local/ directory for files. You
 need to tell the RPM spec file which
                       databases to support and the location of the top-level of your database server.
                       This example will explain the process of adding support for the popular MySQL database server, using
 the mod
                       installation for Apache.
                       Of course all of this information can be adjusted for any database server that PHP supports. I will
 assume you installed                       MySQL and Apache completely with RPMS for this example as well.
                           First remove mod_php3
                           rpm -e mod_php3
                           Then get the source rpm and INSTALL it, NOT --rebuild
                           rpm -Uvh mod_php3-3.0.5-2.src.rpm
                           Then edit the
 /usr/src/redhat/SPECS/mod_php3.spec file
                           In the %build section add the database support you want, and the path.
                           For MySQL you would add --with-mysql=/usr \                           The %build section will look
 something like this:
                           ./configure --prefix=/usr \
                           --with-apxs=/usr/sbin/apxs \
                           --with-config-file-path=/usr/lib \
                           --enable-debug=no \
                           --enable-safe-mode \
                           --with-exec-dir=/usr/bin \
                           --with-mysql=/usr \
                           --with-system-regex
                           Once this modification is made then build the binary rpm as follows:
                           rpm -bb /usr/src/redhat/SPECS/mod_php3.spec 
  
  
 and then , this is the error message in the end of compile:
  
  
 .
 .
 .
 checking for MySQL support... no
 configure: error: Invalid MySQL directory - unable to find mysql.h under /usr/
 Bad exit status from /var/tmp/rpm-tmp.3801 (%build)
  
  
 Please , if someone has good knowledge about setup PHP with MySQL, please contact me , because I am trying to
 compile this products to work together , but in the last times I had I lot of problems.
 I thank you in advanced for your help.
  
 Regards
  
 Fabricio C. Greco

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-26 19:07 UTC] mrobinso@php.net
This is a dated report.
Closing.
Please reopen if problems persist with newer
versions of PHP, and have a look at the install
mailing list.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 21:01:30 2025 UTC