From: givanz at yahoo dot com
Operating system: CentOS 4
PHP version: 5.2.3
PHP Bug Type: Compile Failure
Bug description: Does not compile with mysqli
Description:
------------
When i compile php with mysql or mysqli extension it doesn't work
i have mysql 5.0.45 is this version suported ?
//compile command
./configure --prefix=/home/web/php --with-apxs2=/home/web/apache/bin/apxs
--enable-sockets --with-zip --enable-mbstring --with-zlib --without-sqlite
--enable-spl --with-mysqli=/home/web/mysql/bin/mysql_config --without-pear
--disable-cgi && make && make install
//last lines
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_r... no
configure: error: wrong mysql library version or lib not found. Check
config.log for more information.
//config.log
configure:58392: checking for MySQL support
configure:58438: checking for specified location of the MySQL UNIX socket
configure:59597: checking for MySQLi support
configure:59643: checking whether to enable embedded MySQLi support
configure:59793: checking for mysql_set_server_option in -lmysqlclient_r
configure:59812: gcc -o conftest -I/usr/include -O3 -march=pentium4 -pipe
-ftracer -fforce-addr -falign-functions=32 -mfpmath=sse
-fprefetch-loop-arrays -momit-leaf-frame-pointer -fomit-frame-pointer
-ffast-math -fexpensive-optimizations -mmmx -msse -msse2
-D_FORTIFY_SOURCE=2 -pthread -D_REENTRANT
-Wl,-rpath,/home/web/mysql/lib/mysql -L/home/web/mysql/lib/mysql -L/usr/lib
-lmysqlclient_r -lz -lcrypt -lnsl -lm conftest.c -lmysqlclient_r -lz
-lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/bin/ld: cannot find -lmysqlclient_r
collect2: ld returned 1 exit status
configure: failed program was:
#line 59801 "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() {
mysql_set_server_option()
; return 0; }
--
Edit bug report at http://bugs.php.net/?id=42056&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=42056&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=42056&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=42056&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42056&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=42056&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42056&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42056&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42056&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42056&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42056&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=42056&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=42056&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42056&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42056&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42056&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42056&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42056&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42056&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42056&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42056&r=mysqlcfg