in this post i will explain you how to install php 5.5 with Apache 2.4 on windows.

      Apache : I already explained for installation guide for Apache 2.4.12 in my previous post. if you want installation guide for Apache then go to my previous post i.e.  install Apache 2.4

now download php 5.5  binaries from official php website . To download php 5.5 click here.  on website click on  download link


Similar to Apache, you have to extract PHP to a directory on your computer, say “C:PHP”.


  •   go to “C:PHP” , there is a file named php.ini-development  , make a copy of it and rename that copy to  “php.ini” in same directory. now you have to enable short open tag . open  the php.ini in notepad and find (press ctrl + f)
  • short_open_tag = Off
  • now make this

  • short_open_tag = On
  • PHP as an Apache module

    Here we configure Apache to load PHP as a module to enable the web server parse your PHP scripts. Open the Apache configuration file, “httpd.conf” in notepad. that should be in C:Apache24confhttpd.conf. FInd (ctrl+f)  the section of the file that has a series of “LoadModule” statements. add a new LoadModule statement for php5apache2_4.dll . don’t make it prefixed by # symbol. it regarded as inactive.

  • LoadModule php5_module "C:/php/php5apache2_4.dll"

  now  search again document for “addtype” and add the following after the last addtype statement:

     AddType application/x-httpd-php .php
  • Configuring the default index file

In most servers when a directory is requested, the web server returns the index.php or index.html files. To change this behavior on our web server, we need to update the “httpd.conf” file in notepad. Look for (ctrl+f) following line.

DirectoryIndex index.html

 and replace it with

  DirectoryIndex index.php index.html
  • Restart Apache

to make this settings  changed you have to restart the Apache server. to restart that install Apache as windows service (for that watch my previous post). now run (hit Win + R) and enter “services.msc”. In this list you will see Apache 2.4 listed. Restart it from there.  php is installed in your  system.

  • Test your Installation

open notepad  and save a blank file as “info.php” to  “C:Apache24htdocs” .  navigate your browser to . If all goes well you you should see a blank screen.

       lets comment about tutorial and give suggestions for next post.

Rajendra Choudhary

Rajendra is a Cyber Security Analyst, Developer & Professional Blogger. His free time is spent on Blogging, Wordpress, Creating Videos for Youtube Channel to share his knowledge with rest of us
Close Menu