PHP scripts not running after upgrading from php 5.6 to php 7

Hire us for your custom mobile application and Web Application development needs . You can be assured your final deliverable, no matter the technology its built on, will be secure, scalable and sustainable in whatever environment its hosted.

WhatsApp : +918500018686 :: skype: sales@sipcosystems.com

 

Issue:  After upgrading from php5.6 to php 7.2  website is down .

 

 

Upgrading from php 5 to php 7 on centos  may require small changes in httpd (apache2) configuration files .

Error could be related to loading php7 module  and error may display something like 

Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory

This is because  old php.conf is not replaced with new php.conf which should contain LoadModule php7_module modules/libphp7.so

You can rename old php.conf  to php.conf.old   and  php.conf.rpmnew to php.conf 

or add the line

LoadModule php7_module modules/libphp7.so   line   to   /etc/httpd/conf.d/php.conf  file 

Also change

  <IfModule mod_php5.c>  to 

  <IfModule mod_php7.c> 

if you have ssl.conf

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top