http://bugs.php.net/bug.php?id=35848
[@more@][30 Dec 2005 6:38am UTC] shawn dot richards at ink dot ltd dot uk
Found the problem. The PHP compile fails when using this version of MySQL: Mac OS X 10.4, (PowerPC, 64-bit) I have a 64-bit machine and the PHP compile process freaks out at some point because the ranlib returns strange results since data somewhere exceeds the expected 32-bits. This is a legitimate bug, which might not exist in the PHP compiler...but the compile process fails.
Assigned to Mysql support.
You could fix this issue by changing the config line to: --with-mysql=shared (thanks to YorHel)
The problem is fixed when using --with-mysql-dir=/usr/local/mysql instead of --with-mysql=/usr/local/mysql
Thank you pamelastone. That fixed my configure problem. ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql-dir=/usr/local/mysql --with-zlib-dir=/usr
Same bug on RH4.2 AMD64 as well, fix works (with-mysql-dir), my many thanks!
The problem is fixed when using --with-mysql-dir=/usr/local/mysql instead of --with-mysql=/usr/local/mysql ******************************** cannot fix, after install will cannot connect to my sql by using PHP you will see this error "Fatal error: Call to undefined function mysql_connect() " and looking in info.php cannot see mysql too...
Sure. Because there is no such ./configure option like "--with-mysql-dir".
"exactly the problem is fixep by --with-mysql-dir=/path_to_mysql" I used this workaround and was able to compile everything, but I don't have mysql built into PHP. When I run: function_exists( 'mysql_connect' ) it returns false. Did anyone else get this problem? (I may have messed up the install in some other way, it's my first time installing)
I also cannot use any of the MySQL functions as it tells me that the extension could not be loaded. I tried both with --with-mysql=shared and --with-mysql-dir=/usr/local/mysql.
There is NO SUCH ./configure OPTION like --with-mysql-dir. Please stop adding useless comments to the report.
still don't know how to fix this now I moved to use php 64 bit PHP RPM fedora I install webmin and download php-5.1.2-5.x86_64.rpm http://fr2.rpmfind.net/linux/RPM/index.html it work for me.. but i prefer ito compile form source..
For linux 64 bits system you need to add: --with-libdir=/lib64 to your configure line Please ask further support questions to the php installation mailing list. This is not a support medium.
2 linuxrulez at bk dot ru Tnx man! All working fine! I have the same problem. Arch: i686 OS: Linux Slackware Current (04.06.2006) MySQL: 5.1.9 beta Apache 2.2.2 PHP ver. 5.1.4 have a installed glibc 2.3 after installing OS (minimum installation, but i've check for glibc - its already there) I have just download next one: mysql-5.1.9-beta-linux-i686-glibc23.tar.gz - making a standart installation procedure - making auto up/down script for system rebooting case. then install PHP 5.1.4 with this string: ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --with-mysql=/usr/local/mysql --with-gd --with-apxs2=/usr/local/apache2/bin/apxs --enable-ftp --enable-mbstring --with-zlib and all working DONE!! Realy tnx! Best regards, Oleg
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip
I'm currently experiencing the same problem, with any combination of the following: Apache v2.2.2 MySQL v5.0.22 & v5.1.11-beta-i686 PHP 5.1.4 & 5.2 Snapshot (200606221230) Configuration output: --------------------- checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... no checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. --------------------- Tried it with both 5.1.4 and the latest snapshot, which unfortunately does not resolve the issue. I can confirm that using MySQL v5.0.18 instead of 5.0.22 or 5.1.x does work. I think it is the same as, or at least related to the following bug: http://bugs.mysql.com/bug.php?id=19817 Every MySQL version below 5.0.20 seems to be unaffected.
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".
I faced the same problem with the binary distribution of MySQL 5.0.22. Instead I try with the source distribution (of the same version 5.0.22) and It worked :)
I've the same problem: Both verions (binary and self-compiled sourcecode) of MYSQL 5.0.22 didn't worked pretty ! Using 5.0.18 solved the problem
anyone going to help on this? i've faced the same problem with mysql 5.0.22 with php 5.1.4... the problem has been reported on mysql support website, but yet, no one have got the solutions to it. i think it's due to libmysql... when i tried to compile using --with-mysqli=/usr/local/mysql/bin/mysql_config it states something to do with invalid version of libmysql.. my box was just freshly installed mysql 5.0.22... and now attempting to compile the php 5.1.4 example: --with-mysql=/usr/local/mysql --with-gd --enable-embedded-mysqli --with-gd2 --with-openssl --with-sockets --enable-mbstring --enable-ftp --enable-sockets --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib-dir=/usr/lib
i've checked on the changelog of mysql... from mysql 5.0.18 to 5.0.22 almost all of them are security fixes... this could be a security treat for all existing mysql 5.0.22 and below
i've tried to build mysql 5.0.22 with sources.. and use my configure line for php as: ./configure --with-mysql=/usr/local/include/mysql --with-gd --enable-embedded-mysqli --with-gd2 --with-openssl --with-sockets --enable-mbstring --enable-ftp --enable-sockets --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-zlib-dir=/usr/lib ** and it works!
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/19423/viewspace-856174/ ,如需转载,请注明出处,否则将追究法律责任。
Description: ------------ Mac OS X patched up to date. Apache 2. PHP 5 (latest snap) Compilation with --with-mysql option fails. Have tried compiling with MySQL 4.x Standard, 5.x Standard (preferred) and 5.x Debug. Same error every compilation even though MySQL works every time. Reproduce code: --------------- ./configure --with-apxs2=/usr/local/apache/bin/apxs --enable-bcmath --enable-debug --with-mysql=/usr/local/mysql --with-zlib-dir=/usr/local/lib Expected result: ---------------- Successful compile. Actual result: -------------- Configure script fails with....... checking for MSSQL support via FreeTDS... no checking for MySQL support... yes checking for specified location of the MySQL UNIX socket... no checking for MySQL UNIX socket location... no checking for mysql_close in -lmysqlclient... no checking for mysql_error in -lmysqlclient... no configure: error: mysql configure failed. Please check config.log for more information. -------------------------------------------- Config Log says......... configure:58617: checking for MSSQL support via FreeTDS configure:59267: checking for MySQL support configure:59313: checking for specified location of the MySQL UNIX socket configure:59370: checking for MySQL UNIX socket location configure:59556: checking for mysql_close in -lmysqlclient configure:59575: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib conftest.c - lmysqlclient -lz -lm -lxml2 -lz -liconv -lm -lxml2 -lz - liconv -lm 1>&5 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59564 "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_close(); int main() { mysql_close() ; return 0; } configure:59796: checking for mysql_error in -lmysqlclient configure:59815: gcc -o conftest -g -O2 -no-cpp-precomp -L/ usr/local/mysql/lib -L/usr/local/mysql/lib -L/usr -L/usr conftest.c -lmysqlclient -lz -lz -lm -lxml2 -lz -liconv - lm -lxml2 -lz -liconv -lm 1>&5 /usr/bin/ld: truncated or malformed archive: /usr/local/ mysql/lib/libmysqlclient.a (ranlib structures in table of contents extends past the end of the table of contents, can't load from it) collect2: ld returned 1 exit status configure: failed program was: #line 59804 "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_error(); int main() { mysql_error() ; return 0; }