1

I have updated the PHP from PHP 5.6 to PHP 7.4. After the updated web Server apache, is down. The Error is

"httpd: Syntax error on line 39 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.modules.d/php5.load: Cannot load modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory"

Line 39 on /etc/httpd/conf/httpd.conf: Include is like this "/etc/httpd/conf.modules.d/*.load"

Line 1 on /etc/httpd/conf.modules.d/php5.load is like this "LoadModule php5_module modules/libphp5.so"

Server version: Apache/2.4.6 (CentOS)

2
  • 5
    Your Apache is still trying to load PHP5. Look at the error messages Commented Jun 2, 2021 at 10:36
  • Have a look to your modules in /etc/apache2/mods-enabled et remove php5 with a2dismod ... Commented Jun 2, 2021 at 10:43

1 Answer 1

2

Use a2dismod command to disable your old PHP version & a2enmod command to enable newer version. Later, restart apache service too load changes.

a2dismod php5.6  // disables php5.6
a2enmod  php7.4  // enables php7.4
sudo systemctl restart httpd.service // restart apache service
Sign up to request clarification or add additional context in comments.

1 Comment

Ok, How can we disable this on CentOS ? These commands does not found on CentOS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.