Fixing httpd: [warn] module php5_module is already loaded, skipping

I have a CentOS webserver with the Apache and PHP installed on it and it works perfectly but when I restart the Apache service, I get this error:

[warn] module php5_module is already loaded, skipping

To solve this problem, I have to verify this module load call in two files and need to remove/comment from one of these file.
First, I need to check Apache main file:

sudo nano /etc/httpd/conf/httpd.conf

Yes, the module load call exist in this file:

Also check the php.conf file:

sudo nano /etc/httpd/conf.d/php.conf

Yes, module load call also exist here, so to fix this warning, we’ll comment/remove the module load call here:

#LoadModule php5_module modules/

Restart the httpd service:

sudo service httpd restart

This time, it didn’t display the warning!
Hope this will help you!

Leave a Reply

Your email address will not be published.