This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center。
6年前关闭。
我手工编译Apache-MySQL-PHP,使用下面的configure选项构建自定义安装。当我启动apache时,它无法启动,并在error_log中添加以下错误。
* Apache 2
* MySQL 5.0
* PHP 5.1
* CentOS Linux 5.4
* GCC编译器
Apache日志中的错误
httpd:/opt/clamp/etc/httpd.conf的第54行的语法错误:无法将/opt/clamp/modules/libphp5.so加载到服务器中:/opt/clamp/modules/libphp5.so:未定义的符号:_estrndup
./configure选项
亚太地区
。/配置 \
--prefix = / opt / clamp \
--sysconfdir = / opt / clamp / etc \
--enable-auth-dbm \
--enable-cern-meta \
--enable-auth-digest \
--enable-charset-lite \
--enable-deflate \
--enable-expires \
--enable-cache \
--enable-disk-cache \
--enable-file-cache \
--enable-headers \
--enable-info \
--enable-mime-magic \
--enable-proxy \
--enable-proxy-ajp \
--enable-proxy-balancer \
--enable-proxy-connect \
--enable-proxy-ftp \
--enable-proxy-http \
--enable-rewrite \
--enable-so \
--enable-ssl
MySQL数据库
。/配置 \
--prefix = / opt / clamp \
--sysconfdir = / opt / clamp / etc \
--libexecdir = / opt / clamp / sbin \
--localstatedir = / opt / clamp / var \
--with-unix-socket-path = / opt / clamp / tmp / mysql.sock \
-启用线程安全
的PHP
。/配置 \
--prefix = / opt / clamp \
--sysconfdir = / opt / clamp / etc \
--with-apxs2 = / opt / clamp / bin / apxs \
--with-config-file-path = / opt / clamp / etc / php.conf \
--with-mysql = / opt / clamp \
--with-mysqli = / opt / clamp / bin / mysql_config \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--with-gdbm \
--with-ldap \
--with-ldap-sasl \
--enable-zip \
--with-bz2 \
--with-gd
--with-jpeg-dir = / usr \
--with-png-dir = / usr
6年前关闭。
我手工编译Apache-MySQL-PHP,使用下面的configure选项构建自定义安装。当我启动apache时,它无法启动,并在error_log中添加以下错误。
* Apache 2
* MySQL 5.0
* PHP 5.1
* CentOS Linux 5.4
* GCC编译器
Apache日志中的错误
httpd:/opt/clamp/etc/httpd.conf的第54行的语法错误:无法将/opt/clamp/modules/libphp5.so加载到服务器中:/opt/clamp/modules/libphp5.so:未定义的符号:_estrndup
./configure选项
亚太地区
。/配置 \
--prefix = / opt / clamp \
--sysconfdir = / opt / clamp / etc \
--enable-auth-dbm \
--enable-cern-meta \
--enable-auth-digest \
--enable-charset-lite \
--enable-deflate \
--enable-expires \
--enable-cache \
--enable-disk-cache \
--enable-file-cache \
--enable-headers \
--enable-info \
--enable-mime-magic \
--enable-proxy \
--enable-proxy-ajp \
--enable-proxy-balancer \
--enable-proxy-connect \
--enable-proxy-ftp \
--enable-proxy-http \
--enable-rewrite \
--enable-so \
--enable-ssl
MySQL数据库
。/配置 \
--prefix = / opt / clamp \
--sysconfdir = / opt / clamp / etc \
--libexecdir = / opt / clamp / sbin \
--localstatedir = / opt / clamp / var \
--with-unix-socket-path = / opt / clamp / tmp / mysql.sock \
-启用线程安全
的PHP
。/配置 \
--prefix = / opt / clamp \
--sysconfdir = / opt / clamp / etc \
--with-apxs2 = / opt / clamp / bin / apxs \
--with-config-file-path = / opt / clamp / etc / php.conf \
--with-mysql = / opt / clamp \
--with-mysqli = / opt / clamp / bin / mysql_config \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-gettext \
--with-gdbm \
--with-ldap \
--with-ldap-sasl \
--enable-zip \
--with-bz2 \
--with-gd
--with-jpeg-dir = / usr \
--with-png-dir = / usr
最佳答案
如果您不想阅读所有错误日志,则可以尝试:
char *
estrndup(const char *s, size_t len)
{
char *d = strndup(s, len);
//if (d == NULL)
// (*efunc)(1, "Cannot copy string");
return d;
}
关于php - PHP错误:libphp5.so: undefined symbol :_estrndup ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2385735/
10-14 07:31