php Apache 无法将模块/libphp5.so 加载到服务器中:当我安装 php5-gd 时
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20510831/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Apache Cannot load modules/libphp5.so into server: when I installed php5-gd
提问by user2924482
I was trying to install php5-gd but after ran this command:
我试图安装 php5-gd 但在运行此命令后:
yum install php-gd php-tidy
and tried to restart apache:
并尝试重新启动 apache:
httpd -k restart
I got the following error:
我收到以下错误:
httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.modules.d/10-php.conf: Cannot load modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: symbol SSLeay_version, version OPENSSL_1.0.1 not defined in file libcrypto.so.10 with link time reference
Any of you knows why or how can I fix this error?
你们中的任何人都知道为什么或如何解决此错误?
回答by Joseph Christopher
It could be because openSSL hasn't been updated. Could you try updating openSSL via yum and let us know if it works?
可能是因为 openSSL 尚未更新。您可以尝试通过 yum 更新 openSSL 并告诉我们它是否有效吗?
yum update openssl
回答by Michael Tabolsky
The php you are trying to load is compiled with more recent version of openssl than you have installed. Most probably you have messed installation using repositories with different versions of openssl libs. Or else for different versions of OS.
您尝试加载的 php 是使用比您安装的版本更新的 openssl 编译的。很可能您使用具有不同版本的 openssl 库的存储库搞乱了安装。或者对于不同版本的操作系统。
yum list php-gdand yum list opensslrpm -qf /etc/httpd/modules/libphp5.soshould give you a hint or two.
yum list php-gd并且yum list opensslrpm -qf /etc/httpd/modules/libphp5.so应该给你一两个提示。
回答by kishwer
yum remove httpd
yum 删除 httpd
yum clean all
百胜干净
Step1: install fedora 19
第一步:安装fedora 19
Step2: install repository
第二步:安装仓库
rpm -Uvh http://rpms.famillecollet.com/remi-release-19.rpm
Step3: Install Apache (httpd) Web server and PHP 5.5.9
步骤 3:安装 Apache (httpd) Web 服务器和 PHP 5.5.9
yum --enablerepo=remi install httpd php php-common
Step4: Install PHP 5.5.9 modules
步骤 4:安装 PHP 5.5.9 模块
yum --enablerepo=remi install php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml
Step5: enable service and run it systemctl enable httpd.service
Step5:启用服务并运行它 systemctl enable httpd.service
/etc/init.d/httpd start ## use restart after update
OR service httpd start ## use restart after update
或 service httpd start ## 更新后使用重启
Step 6: Create test PHP page to check that Apache, PHP and PHP modules are working
第 6 步:创建测试 PHP 页面以检查 Apache、PHP 和 PHP 模块是否正常工作
add test page to /var/www/html/test.php file and run using localhost/test.php
回答by user2290254
Just comment this libphp5.sofile under error.conffile and try to restart the httpd server like:
只需在libphp5.sofile 下注释此文件error.conf并尝试重新启动 httpd 服务器,例如:
/etc/init.d/httpd start
If again you are facing issue then check the certificate under the specific location where the .crtand .jksfile exist.
如果您再次遇到问题,请检查.crt和.jks文件所在的特定位置下的证书。
回答by SilverlightFox
Fedora 25:
软呢帽 25:
sudo dnf -y remove httpd
sudo dnf -y install httpd
I would recommend having a backup of all files and configuration though, just in case.
不过,我建议备份所有文件和配置,以防万一。
回答by Mian Asbat Ahmad
On Centos 7
在 Centos 7
yum install -y php php-common
yum install openssl
or
yum reinstall openssl
systemctl restart httpd

