0

Apache-MySQL-PHPを手動でコンパイルし、以下の構成オプションを使用してカスタムインストールを構築します。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オプション

APACHE ./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 ./configure \ --prefix = / opt / clamp \ --sysconfdir = / opt / clamp / etc \ --libexecdir = / opt / clamp / sbin \ --localstatedir = / opt / clamp / var \ --with -unix-socket-path = /opt/clamp/tmp/mysql.sock \ --enable-thread-safe

PHP./configure\--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

4

3 に答える 3

0

すべてのエラーログを読み取る予定がない場合は、次のことを試すことができます。

char *
estrndup(const char *s, size_t len)
{
    char *d = strndup(s, len);
    //if (d == NULL)
    //  (*efunc)(1, "Cannot copy string");
    return d;
}
于 2010-03-07T19:49:27.823 に答える
0

私はPHPのGDライブラリを正しく構築していなかったようで、次のオプションを使用してPHPを構築しました(エラーは発生しません)。

cd php-5.2.13 / ./configure \ --prefix = / opt / clone \ --sysconfdir = / opt / clamp / etc \ --with-apxs2 = / opt / clamp / bin / apxs \ --with- config-file-path = / opt / clamp / etc/php。conf \ --disable-debug \ --with-pic \ --disable-rpath \ --without-pear \ --with-bz2 \ --with-curl \ --with-freetype-dir = / usr \- -with-png-dir = / usr \ --enable-gd-native-ttf \ --without-gdbm \ --with-gettext \ --with-gmp \ --with-iconv \ --with-jpeg- dir = / usr \ --with-openssl \ --with-pspell \ --with-zlib \ --with-layout = GNU \ --enable-exif \ --enable-ftp \ --enable-magic-quotes \ --enable-sockets \ --enable-sysvsem --enable-sysvshm --enable-sysvmsg \ --enable-wddx \ --with-kerberos \ --enable-ucd-snmp-hack \ --enable-shmop \ --enable-calendar \ --without-sqlite \ --enable-force-cgi-redirect \ --enable-pcntl \ --with-imap --with-imap-ssl \ --enable-mbstring \- enable-mbregex \ --with-ncurses \ --with-gd \ --enable-bcmath \ --with-xmlrpc \ --with-ldap --with-ldap-sasl \ --with-mysql = / opt /クランプ\--with-mysqli= / opt / clone / bin / mysql_config\ --enable-dom \ --with-pgsql \ --enable-soap \ --enable-xmlreader --enable-xmlwriter \ --enable-fastcgi make make install

于 2010-04-20T16:06:33.960 に答える
-1

これは、phpが正しくビルドされていないことを意味します。おそらく、私が行ったように、何度か作成したためであり、最後に完了したときだけです。これらのビルドの間に、途中でいくつかのサポートパッケージをインストールしましたが、最初はそれを忘れていました。したがって、あなたはきれいにしないと、きれいではない何かになってしまいます。そして、Apacheはそれを行うにはあまりにもうるさいです。したがって、最善の試みは、「make clean」を再度実行し、phpを再構築して、実際に何が起こったかを確認することです。

于 2013-04-01T23:15:16.983 に答える