Site icon

PHP 7 Configuration in Apache Server


On this page, we will go through the steps involved in PHP Configuration with the Apache HTTP Web server.


Open the Apache configuration file httpd.conf and the PHP configuration parameters to the file. We can find the file under the conf directory.

Apache Home dir\conf


Steps to add the configuration


#PHP Configuration
AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php7_module "c:/php/php7apache2_4.dll"
PHPIniDir "c:/php"


Test PHP file

Drop a test PHP file under the htdocs directory.

* This is to test PHP 7 configuration with Apache2
     echo "If you see this PHP Configuration with Apache is OK!-";


Open the browser and visit the file URL.



PHP Tutorials

PHP Tutorials on this website:

More Information on PHP

Exit mobile version