#42464 [Fbk->Bgs]: MySQL library location issues
| From: | jani@php.net | Date: | Fri, 31 Aug 2007 07:16:33 +0000 |
| Subject: | #42464 [Fbk->Bgs]: MySQL library location issues | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-116910@lists.php.net to get a copy of this message | ||
ID: 42464
Updated by: jani@php.net
Reported By: juan at pons dot org
-Status: Feedback
+Status: Bogus
Bug Type: MySQL related
Operating System: OSX 10.4.10
PHP Version: 5.2.4
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2007-08-31 07:12:01] jani@php.net
Never heard about phpize?
------------------------------------------------------------------------
[2007-08-30 20:35:18] 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-30 20:19:05] jani@php.net
Why are you running buildconf? That's complete waste of time.
------------------------------------------------------------------------
[2007-08-30 14:23:04] 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-28 19:21:35] 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
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42464&edit=1