I am compiling PHP version 5.2 with mysql extension mysqli
bellow are the steps
sudo ./configure --with-mysqli=/opt/mysql/server-5.1/bin/mysql_config
[It's working fine mysql version is 5.1 i have also try with latest]
make
[After make bellow error i am getting]
-lmysqlclient -lz -lcrypt -lnsl -lm -lxml2 -lcrypt -lxml2 -lxml2 -lxml2 -lcrypt -o sapi/cgi/php-cgi
ext/mysqli/mysqli_repl.o: In function zif_mysqli_disable_reads_from_master':
/usr/local/src/php5-build/php-5.2.5/ext/mysqli/mysqli_repl.c:43: undefined reference to
mysql_disable_reads_from_master'
ext/mysqli/mysqli_repl.o: In function zif_mysqli_disable_rpl_parse':
/usr/local/src/php5-build/php-5.2.5/ext/mysqli/mysqli_repl.c:59: undefined reference to
mysql_disable_rpl_parse'
ext/mysqli/mysqli_repl.o: In function zif_mysqli_enable_reads_from_master':
/usr/local/src/php5-build/php-5.2.5/ext/mysqli/mysqli_repl.c:76: undefined reference to
mysql_enable_reads_from_master'
ext/mysqli/mysqli_repl.o: In function zif_mysqli_enable_rpl_parse':
/usr/local/src/php5-build/php-5.2.5/ext/mysqli/mysqli_repl.c:93: undefined reference to
mysql_enable_rpl_parse'
ext/mysqli/mysqli_repl.o: In function zif_mysqli_master_query':
/usr/local/src/php5-build/php-5.2.5/ext/mysqli/mysqli_repl.c:111: undefined reference to
mysql_master_query'
ext/mysqli/mysqli_repl.o: In function zif_mysqli_rpl_parse_enabled':
/usr/local/src/php5-build/php-5.2.5/ext/mysqli/mysqli_repl.c:130: undefined reference to
mysql_rpl_parse_enabled'
ext/mysqli/mysqli_repl.o: In function zif_mysqli_rpl_probe':
/usr/local/src/php5-build/php-5.2.5/ext/mysqli/mysqli_repl.c:147: undefined reference to
mysql_rpl_probe'
ext/mysqli/mysqli_repl.o: In function zif_mysqli_rpl_query_type':
/usr/local/src/php5-build/php-5.2.5/ext/mysqli/mysqli_repl.c:168: undefined reference to
mysql_rpl_query_type'
ext/mysqli/mysqli_repl.o: In function zif_mysqli_slave_query':
/usr/local/src/php5-build/php-5.2.5/ext/mysqli/mysqli_repl.c:207: undefined reference to
mysql_slave_query'
collect2: ld returned 1 exit status
make: * [sapi/cgi/php-cgi] Error 1
Please let me know the solution
I have run this command
sudo ./configure --disable-all --with-mysql=/opt/mysql/server-5.1/ --with-mysqli=/opt/mysql/server-5.1/bin/mysql_config
and it's working in my previous command i am missing the /opt/mysql/server-5.1/