|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49771 MYSQL_LIBS and MYSQL_INCLUDE path being read incorrectly?
Submitted: 2009-10-04 22:28 UTC Modified: 2009-10-13 01:00 UTC
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: zshadow at gmail dot com Assigned:
Status: No Feedback Package: MySQL related
PHP Version: 5.3.0 OS: Linux / CentOS 5.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
1 + 39 = ?
Subscribe to this entry?

 [2009-10-04 22:28 UTC] zshadow at gmail dot com
I have two copies of MySQL installed, one is in a non standard directory. When linking PHP against the non standard one, it sets the MYSQL_LIBS and MYSQL_INCLUDE paths to their default values and not the one specified in configure. I receive no errors when building, but when running scripts on PHP I'll get errors messages that say "eaders and client library minor version mismatch. Headers:50085 Library:50139

Reproduce code:
./configure --prefix=/serverdojo/php --with-config-file-scan-dir=/test/php/php.d --with-mysqli=/serverdojo/mysqld/bin/mysql_config --with-libdir=lib64 --enable-fastcgi --with-mysql-sock=/test/mysqld/mysql2.sock --with-mysql=/test/mysqld/include/mysql --without-pear --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-gd-native-ttf --with-imap-ssl --with-gd=shared --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --disable-pdo --disable-pgsql --with-curl --disable-debug --enable-pic --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-xslt --enable-zip --with-pcre-regex

Expected result:
MYSQL_LIBS should to be set to /test/mysqld/lib
MYSQL_INCLUDE should to be set to /test/mysqld/include/mysql


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-05 03:10 UTC] zshadow at gmail dot com
I have fixed it by manually editing the includes portion of the Makefile. Although MYSQL_LIBS and MYSQL_INCLUDE still report the default paths, Client API and Header is being listed as 5.1.39.

This is fine as I'm only using this installation as a testbed, but still wondering there's a way to get it working without any manual Makefile editing.
 [2009-10-05 19:20 UTC]
What if you use the correct path there? You're not supposed to pass the 
include path to --with-mysql but the install _prefix_..
 [2009-10-13 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 20:01:31 2024 UTC