./configure –prefix=/bwserver/php525 –with-apxs2=/bwserver/apache228/bin/apxs –enable-sockets –enable-mbstring –with-zlib –with-png-dir –with-gd –with-jpeg-dir –with-freetype-dir –with-libxml-dir=/usr/local/libxml –with-mysql=/usr/local/mysql –with-mysqli=/usr/local/mysql/bin/mysql_config 发现启用mysqli后,显示:Call to undefined function mysqli_init()。 mysql.com上找到了解决方案。 http://dev.mysql.com/doc/refman/5.0/en/php-mysql-mysqli.html
Edit the
Makefileand search for a line that starts withEXTRA_LIBS. It might look like this (all on one line):EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lmysqlclient -lz -lcrypt -lnsl -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lcryptRemove all duplicates, so that the line looks like this (all on one line):
EXTRA_LIBS = -lcrypt -lcrypt -lmysqlclient -lz -lresolv -lm -ldl -lnsl -lxml2