编译的时候正常:
./configure --prefix=/usr/local/mysqli --with-PHP-config=/usr/local/PHP/bin/PHP-config --with-MysqLi=/usr/local/MysqL/bin/MysqL_config
在make的时候报以下错误:
/usr/local/MysqL/include/MysqL/my_config.h:1147:1: warning: "PACKAGE_VERSION" redefined
In file included from /usr/local/PHP/include/PHP/TSRM/tsrm_config.h:1,
from /usr/local/PHP/include/PHP/TSRM/tsrm_config_common.h:13,
from /usr/local/PHP/include/PHP/TSRM/tsrm_virtual_cwd.h:27,
from /usr/local/PHP/include/PHP/main/PHP.h:401,
from /usr/local/PHP-5.5.38/ext/MysqLi/MysqLi_api.c:29:
/usr/local/PHP/include/PHP/main/../main/PHP_config.h:2113:1: warning: this is the location of the prevIoUs deFinition
/usr/local/PHP-5.5.38/ext/MysqLi/MysqLi_api.c:36:47: error: ext/MysqLnd/MysqL_float_to_double.h: No such file or directory
make: *** [MysqLi_api.lo] Error 1
解决方法:
修改 vim /usr/local/PHP-5.5.38/ext/MysqLi/MysqLi_api.c文件
将#include "ext/MysqLnd/MysqL_float_to_double.h" 修改为绝对路径:
#include "/usr/local/PHP-5.5.38/ext/MysqLnd/MysqL_float_to_double.h"