PHP 在 solaris 10 上失败
PHP Fail on solaris 10
我试图让 PHP 在 Solaris 10 机器上工作,PHP 使用以下配置成功安装,没有抛出任何错误:
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/lib --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql --with-mssql=/usr/local/freetds --without-pgsql --with-zlib --with-zlib-dir=/usr/local --with-iconv-dir=/usr/local --with-pcre-dir=/usr/local --with-gettext=/usr/local --with-libxml-dir=/usr/local --with-gd --with-xpm-dir=/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-gnu-ld --enable-shared --enable-mbstring --enable-exif --enable-soap --enable-zip --enable-ftp --enable-mysqlnd --disable-zend-signals --disable-static
然而,当我启动 Apache 服务器并访问 php 信息页面时:
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
我得到一个空白页..
当 运行 php -m 时,我收到很多关于许多失败库的致命错误,下面是输出:
[root@mm]#php -m
ld.so.1: php: fatal: libreadline.so.6: open failed: No such file or directory
ld.so.1: php: fatal: libmysqlclient.so.18: open failed: No such file or directory
ld.so.1: php: fatal: libsybdb.so.5: open failed: No such file or directory
ld.so.1: php: fatal: libmcrypt.so.4: open failed: No such file or directory
ld.so.1: php: fatal: libltdl.so.7: open failed: No such file or directory
ld.so.1: php: fatal: /usr/sfw/lib/amd64//libfreetype.so.6: wrong ELF class: ELFCLASS64
ld.so.1: php: fatal: libX11.so.6: open failed: No such file or directory
ld.so.1: php: fatal: libxcb.so.1: open failed: No such file or directory
ld.so.1: php: fatal: libXau.so.6: open failed: No such file or directory
ld.so.1: php: fatal: libXdmcp.so.6: open failed: No such file or directory
ld.so.1: php: fatal: libpng14.so.14: open failed: No such file or directory
ld.so.1: php: fatal: libjpeg.so.8: open failed: No such file or directory
ld.so.1: php: fatal: libdb-4.8.so: open failed: No such file or directory
ld.so.1: php: fatal: libgdbm.so.3: open failed: No such file or directory
ld.so.1: php: fatal: libpcre.so.1: open failed: No such file or directory
ld.so.1: php: fatal: libcrypto.so.0.9.8: open failed: No such file or directory
ld.so.1: php: fatal: libssl.so.0.9.8: open failed: No such file or directory
ld.so.1: php: fatal: libgssapi_krb5.so.2: open failed: No such file or directory
ld.so.1: php: fatal: libkrb5.so.3: open failed: No such file or directory
ld.so.1: php: fatal: libk5crypto.so.3: open failed: No such file or directory
ld.so.1: php: fatal: libcom_err.so.3: open failed: No such file or directory
ld.so.1: php: fatal: libcurl.so.4: open failed: No such file or directory
ld.so.1: php: fatal: libldap-2.4.so.2: open failed: No such file or directory
ld.so.1: php: fatal: liblber-2.4.so.2: open failed: No such file or directory
ld.so.1: php: fatal: libintl.so.8: open failed: No such file or directory
ld.so.1: php: fatal: libsasl2.so.2: open failed: No such file or directory
ld.so.1: php: fatal: libssh2.so.1: open failed: No such file or directory
ld.so.1: php: fatal: libiodbc.so.2: open failed: No such file or directory
ld.so.1: php: fatal: libiconv.so.2: open failed: No such file or directory
ld.so.1: php: fatal: relocation error: file /usr/local/bin/php: symbol rl_library_version: referenced symbol not found
Killed
谢谢
在你的配置文件中有这个指令:
extension_dir =
它应该指向您的扩展所在的位置,即它所抱怨的那些。它似乎没有指向任何可以找到您的 php 库的地方,因此它失败了。
此外,您应该检查您的错误日志是否有任何错误,我建议在您的配置中打开 display_startup_errors
指令以查看 php 模块与 apache 一起启动时的关键问题。
感谢您提供有用的信息,我通过添加以下内容设法解决了这个问题:
LoadModule php7_module modules/libphp7.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir "/usr/local/php/etc/" //this is the location of the PHP configurations file
到 Apache 配置文件,然后重新启动 Apache 服务器..
我试图让 PHP 在 Solaris 10 机器上工作,PHP 使用以下配置成功安装,没有抛出任何错误:
./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/lib --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-mysqli --with-pdo-mysql --with-mssql=/usr/local/freetds --without-pgsql --with-zlib --with-zlib-dir=/usr/local --with-iconv-dir=/usr/local --with-pcre-dir=/usr/local --with-gettext=/usr/local --with-libxml-dir=/usr/local --with-gd --with-xpm-dir=/usr/local --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-gnu-ld --enable-shared --enable-mbstring --enable-exif --enable-soap --enable-zip --enable-ftp --enable-mysqlnd --disable-zend-signals --disable-static
然而,当我启动 Apache 服务器并访问 php 信息页面时:
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
?>
我得到一个空白页..
当 运行 php -m 时,我收到很多关于许多失败库的致命错误,下面是输出:
[root@mm]#php -m
ld.so.1: php: fatal: libreadline.so.6: open failed: No such file or directory
ld.so.1: php: fatal: libmysqlclient.so.18: open failed: No such file or directory
ld.so.1: php: fatal: libsybdb.so.5: open failed: No such file or directory
ld.so.1: php: fatal: libmcrypt.so.4: open failed: No such file or directory
ld.so.1: php: fatal: libltdl.so.7: open failed: No such file or directory
ld.so.1: php: fatal: /usr/sfw/lib/amd64//libfreetype.so.6: wrong ELF class: ELFCLASS64
ld.so.1: php: fatal: libX11.so.6: open failed: No such file or directory
ld.so.1: php: fatal: libxcb.so.1: open failed: No such file or directory
ld.so.1: php: fatal: libXau.so.6: open failed: No such file or directory
ld.so.1: php: fatal: libXdmcp.so.6: open failed: No such file or directory
ld.so.1: php: fatal: libpng14.so.14: open failed: No such file or directory
ld.so.1: php: fatal: libjpeg.so.8: open failed: No such file or directory
ld.so.1: php: fatal: libdb-4.8.so: open failed: No such file or directory
ld.so.1: php: fatal: libgdbm.so.3: open failed: No such file or directory
ld.so.1: php: fatal: libpcre.so.1: open failed: No such file or directory
ld.so.1: php: fatal: libcrypto.so.0.9.8: open failed: No such file or directory
ld.so.1: php: fatal: libssl.so.0.9.8: open failed: No such file or directory
ld.so.1: php: fatal: libgssapi_krb5.so.2: open failed: No such file or directory
ld.so.1: php: fatal: libkrb5.so.3: open failed: No such file or directory
ld.so.1: php: fatal: libk5crypto.so.3: open failed: No such file or directory
ld.so.1: php: fatal: libcom_err.so.3: open failed: No such file or directory
ld.so.1: php: fatal: libcurl.so.4: open failed: No such file or directory
ld.so.1: php: fatal: libldap-2.4.so.2: open failed: No such file or directory
ld.so.1: php: fatal: liblber-2.4.so.2: open failed: No such file or directory
ld.so.1: php: fatal: libintl.so.8: open failed: No such file or directory
ld.so.1: php: fatal: libsasl2.so.2: open failed: No such file or directory
ld.so.1: php: fatal: libssh2.so.1: open failed: No such file or directory
ld.so.1: php: fatal: libiodbc.so.2: open failed: No such file or directory
ld.so.1: php: fatal: libiconv.so.2: open failed: No such file or directory
ld.so.1: php: fatal: relocation error: file /usr/local/bin/php: symbol rl_library_version: referenced symbol not found
Killed
谢谢
在你的配置文件中有这个指令:
extension_dir =
它应该指向您的扩展所在的位置,即它所抱怨的那些。它似乎没有指向任何可以找到您的 php 库的地方,因此它失败了。
此外,您应该检查您的错误日志是否有任何错误,我建议在您的配置中打开 display_startup_errors
指令以查看 php 模块与 apache 一起启动时的关键问题。
感谢您提供有用的信息,我通过添加以下内容设法解决了这个问题:
LoadModule php7_module modules/libphp7.so
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
PHPIniDir "/usr/local/php/etc/" //this is the location of the PHP configurations file
到 Apache 配置文件,然后重新启动 Apache 服务器..