php.net |  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
Votes:1
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-10-04 22:28 UTC] zshadow at gmail dot com
Description:
------------
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] jani@php.net
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-2022 The PHP Group
All rights reserved.
Last updated: Tue Oct 04 03:05:53 2022 UTC