How To Load PHP Module For Apache On CentOS 7

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.

Check Out: Missing “PHP-mbstring” installing Zabbix Monitoring

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

Check Out: Install PHP 7.2 (Hypertext Preprocessor) on Ubuntu

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

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment