|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35688 Configure --with-mysqli failed for MySQL with library or lib version not found
Submitted: 2005-12-15 20:16 UTC Modified: 2005-12-21 15:05 UTC
From: sfletcher at abcoa dot com Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.1.1 OS: AIX 5.2
Private report: No CVE-ID: None
 [2005-12-15 20:16 UTC] sfletcher at abcoa dot com
MySQL Version: 5.0.16 (AIX 64 binary from site)

I followed this documentation at that mentioned "You can download headers and libraries from MySQL." which take me to site.  I then went on to download section and came upon the "Contributed API" section with a link which then lead me to .  So, I followed this part..

 To install the mysqli extension for PHP, use the --with-mysqli=mysql_config_path/mysql_config  configuration option where mysql_config_path represents the location of the mysql_config program that comes with MySQL versions greater than 4.1.

which lead me to this configure command..

./configure --with-mysqli=/usr/local/mysql/bin/mysql_config --with-apxs2=../../apache2/bin/apxs --with-unixODBC --with-openssl --with-curl --disable-libxml --disable-dom --enable-track-vars --enable-ftp --enable-sockets

See actual result below.  I could find no existing bug so I filed a new bug, upon the submission of this bug that cause me find bug #30835 which cause to modify this bug report a little more.

I used the "mysql_config --libs" command from bug #30835 and got this result..

-L/usr/local/mysql/lib -lmysqlclient -lz -lcrypt -lnsl_r -lm

All of the MySQL stuffs are inside the "/usr/local/mysql-standard-5.0.16-aix5.2-powerpc-64bit" directory where I used the symbolic link to make it become a "/usr/local/mysql" directory.

I know the symbolic link is not hte problem because PHP can find it without a problem.

Expected result:
PHP should be able to configured successfully without an error.

Actual result:
Then the configure terminated with errors...

checking for mcrypt support... no
checking for mhash support... no
checking whether to include mime_magic support... no
checking for MING support... no
checking for msession support... no
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... no
checking for specified location of the MySQL UNIX socket... no
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.

The config.log is posted here

configure:53543: checking for mcrypt support
configure:54372: checking for mhash support
configure:54844: checking whether to include mime_magic support
configure:55199: checking for MING support
configure:56122: checking for msession support
configure:56830: checking for mSQL support
configure:57339: checking for MSSQL support via FreeTDS
configure:57987: checking for MySQL support
configure:58033: checking for specified location of the MySQL UNIX socket
configure:59186: checking for MySQLi support
configure:59232: checking whether to enable embedded MySQLi support
configure:59378: checking for mysql_set_server_option in -lmysqlclient
configure:59397: gcc -o conftest -g -O2  -L/usr/local/mysql/lib -L/usr/local/mysql/lib  -L/usr/local/ssl/lib -L/usr/local/ssl/lib -L/usr/local/lib -L/usr/local/lib -lmysqlclient -lz -lcrypt -lnsl_r -lm conftest.c -lmysqlclient  -liconv -lssl -lcrypto -lcurl -lssl -lcrypto -lm  -lcurl -lssl -lcrypto 1>&5
ld: 0711-317 ERROR: Undefined symbol: .mysql_set_server_option
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
configure: failed program was:
#line 59386 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char mysql_set_server_option();

int main() {
; return 0; }

I hope to have this up and running shortly because of work-related web site.  If that is possible.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-16 18:43 UTC]
You're using wrong libs within wrong architecture. And this is never gonna be a PHP bug so stop reopening and call the IBM support instead..

 [2005-12-21 15:05 UTC] sfletcher at abcoa dot com
After costing $500 with IBM tech support.  IBM said GNU GCC is compactible with native AIX's ld and we don't really need GNU Biutilites (GNU Linker or ld).  IBM also said the bug is the MySQL itself.

So, decided to download the MySQL source code as people on the forum say it work better and less problem than pre-compiled package.  So, configured and compiled it.  Kept running into many different compile errors.  So, my company decided to junk MySQL and start looking for a more stable database software.  We can't ill afford to have too many MySQL issues.  Sorry!
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Nov 28 14:01:26 2023 UTC