How To Load PHP Module On Linux
We’re going to show you where to find these modules. It is required to run the PHP files on the server. How to load and install the PHP 5 module in the Apache server. you can also check whether it’s installed using the below command. When you have a website based on the LAMP setup, you will need these modules.
Mostly application or websites needs these modules to install on Apache server to work with the applications properly.
ls /etc/httpd/modules/ | grep php When it's not loaded by default then you can configure a single line in the apache configuration file. In the newest version, you don't need to add these lines and just need to have PHP installed on the server. First, you will have to install the Apache Packages on the server and PHP along with it.
I have already installed Apache Server and assuming you have also.
Now you have to install PHP on the server
yum install php*
After installing, You just have to load the module in httpd.conf file
Put these lines in httpd.conf file
LoadModule php5_module modules/libphp5.so
Then Restart the service of Apache and check the Configuration file syntax
systemctl restart httpd && httpd –t
You’re done php 5 module load install apache module