php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42464 MySQL library location issues
Submitted: 2007-08-28 19:21 UTC Modified: 2007-08-31 07:16 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: juan at pons dot org Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.4 OS: OSX 10.4.10
Private report: No CVE-ID: None
 [2007-08-28 19:21 UTC] juan at pons dot org
Description:
------------
Under OSX, the MySQL binaries from mysql.org get installed under 
/usr/local/mysql


When you try to compile php with --with-mysql=/usr/local/mysql you are 
unable to compile because the php mysql libs are trying to link against 
libraries at /usr/local/mysql/lib/mysql which does not exist in this 
MySQL installation, The correct path should be /usr/local/mysql/lib

I found a way around this problem, by creating appropiate symlinks, but 
this is obviously not ideal

Reproduce code:
---------------
# tar -zxvf php-5.2.3.tar.gz
# cd php-5.2.3
# rm configure
# ./buildconf --force
# ./configure --with-apxs2=/app/apache2/bin/apxs --without-pear --with-config-file-path=/app/ini --with-mysql=/usr/local/mysql
# make
# make install
# /app/apache2/bin/apachectl start

Expected result:
----------------
compile php and have it work with apache

Actual result:
--------------
httpd: Syntax error on line 53 of /app/apache2/conf/httpd.conf: Cannot 
load /app/apache2/modules/libphp5.so into server: Library not loaded: 
/usr/local/mysql/lib/mysql/libmysqlclient.15.dylib\n  Referenced from: 
/app/apache2/modules/libphp5.so\n  Reason: image not found

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-30 14:23 UTC] juan at pons dot org
Tried compiling with the new snapshot as requested and the problem 
still persists.

Here is the error from config.log

configure:98591: ./conftest
dyld: Library not loaded: 
/usr/local/mysql/lib/mysql/libmysqlclient.15.dylib


Here is the sequence of to reproduce the problem

Install MySQL from the mysql.org packages

# tar -zxvf php5.2-latest.tar.gz
# cd php5.2-200708301230/
# rm configure
# ./buildconf --force
./configure --with-apxs2=/app/apache2/bin/apxs --without-pear --with-
config-file-path=/app/ini --with-mcrypt --with-curl  --with-
curlwrappers --enable-cli --with-mysql=/usr/local/mysql


configure gives lots of statuses and then:

checking for PDO includes... checking for PDO includes... 
/Users/jpons/app/src/php5.2-200708301230/ext
checking for char *... yes
checking size of char *... configure: error: cannot compute sizeof 
(char *), 77
See `config.log' for more details.
 [2007-08-30 20:19 UTC] jani@php.net
Why are you running buildconf? That's complete waste of time.
 [2007-08-30 20:35 UTC] juan at pons dot org
The reason I need to run buildconf is because I am installing some php 
extensions that are not part of the standard package and after copying 
the extensions to the ext directory I run buildconf to recreate the 
configure script with the right extensions.

I am going thru the buildconf step without installing the extension to 
take one more variable out of the equation and make sure the problem 
was/is not the extension.

If there is a different way to accomplish the same I would love to know.
 [2007-08-31 07:12 UTC] jani@php.net
Never heard about phpize?
 [2007-08-31 07:16 UTC] jani@php.net
And FYI: configure wouldn't even pass (you can't even compile PHP) if the library and path to it aren't found. So either your hackish build breaks something or you have something else wrong with your system.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Mar 25 09:01:28 2025 UTC