user2924482
user2924482

Reputation: 9140

Apache Cannot load modules/libphp5.so into server: when I installed php5-gd

I was trying to install php5-gd but after ran this command:

yum install php-gd php-tidy

and tried to restart 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?

Upvotes: 6

Views: 42903

Answers (7)

Gabriel Todino
Gabriel Todino

Reputation: 1

Try run

sudo dnf install libnsl

Upvotes: 0

drmaa
drmaa

Reputation: 3684

On Centos 7

yum install -y php php-common
yum install openssl
or 
yum reinstall openssl
systemctl restart httpd

Upvotes: 0

SilverlightFox
SilverlightFox

Reputation: 33578

Fedora 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.

Upvotes: 0

user2290254
user2290254

Reputation: 21

Just comment this libphp5.so file under error.conf file and try to restart the httpd server like:

/etc/init.d/httpd start

If again you are facing issue then check the certificate under the specific location where the .crt and .jks file exist.

Upvotes: 0

kishwer
kishwer

Reputation: 1

yum remove httpd

yum clean all

Step1: install 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

yum --enablerepo=remi install httpd php php-common

Step4: Install PHP 5.5.9 modules

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

/etc/init.d/httpd start ## use restart after update

OR service httpd start ## use restart after update

Step 6: Create test PHP page to check that Apache, PHP and PHP modules are working

add test page to /var/www/html/test.php file and run using localhost/test.php

Upvotes: 0

Michael Tabolsky
Michael Tabolsky

Reputation: 3597

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.

yum list php-gd and yum list openssl rpm -qf /etc/httpd/modules/libphp5.so should give you a hint or two.

Upvotes: 1

Joseph Christopher
Joseph Christopher

Reputation: 164

It could be because openSSL hasn't been updated. Could you try updating openSSL via yum and let us know if it works?

yum update openssl

Upvotes: 8

Related Questions