Sunday, April 20, 2008

Installing Apache and PHP on your PC

So you want to install web server on your own computer and have downloaded Apache and PHP. Please read
Installing Web Server on your PC
first, if in doubt.

Installing Apache web server

Installing Apache is a no-brainer. It is just as you install any other software. Run the set-up, feed the information in each step and click finish to install. It is a 4-5 step installation and wouldn’t take much time to get installed. Be sure not install it as a Windows Sevice (default option).

After installation, fire-up your favorite browser. Type in http://localhost or (both refer top the local server) in the address bar and press enter. You’ll see a welcome page stating that your installation was successful. If it doesn’t show up, go to Start->Programs->Apache HTTP Sever->Control Apache Sever->START.

Installing PHP

Installation of PHP is too, straightforward but to integrate and configure it to work with Apache is a bit cumbersome for a Windows user. Windows users are more accustomed to GUI for configuring software whereas Apache and PHP like most other Linux (UNIX) software requires manual configuration through configuration files which needs to be edited.

PHP comes as a zip file as well as a MSI installation package. I don’t know how it is to install PHP through MSI package; I myself did it with the zip one. For the zip file you just have to unzip the package in a root folder like C:/PHP, D:/PHP. It is recommended to unzip the package in a root folder and not inside folders like C:/Program Files/PHP, which are deep inside root.

[Update: You may download the MSI package of PHP instead of the ZIP one which would do all the set-up and configuration itself and you would have to do otherwise]

That’s it for this post, in the nest post I’m going to outline the method of configuring Apache and PHP.

[Update: Read the next article Configuring Apache Web Server and PHP]

Related Articles:


  1. I dont have the php.ini -dist file

    but i do have php.ini

    are they the same thing?

    I've done everything but its not working, I checked the address url and everything matches...

    I have a router on, could this be the problem?

  2. Thanks for taking interest.

    PHP’s manual installation (ZIP) package provides two preconfigured configuration files (php.ini-dist and php.ini-recommended) with initial configurations. Out of these two one must be renamed to “php.ini” and changes further depending on the exact configuration one wants.

    I think you may be using the self-installing package (MSI). as far as I have read that package installs and configures PHP to work with Apache. In this case, you might not be having “php.ini-dist” file.

    Please tell me the following so I can help you:

    1>Which server are you using?

    2>Have you installed PHP using the MSI package?

    3>If NO, have you configure Apache (or the server) to run PHP scripts?

    Thank you!


You are free to comment anything, although you can comment as 'Anonymous' it is strongly recommended that you supply your name. Thank You.

Please don't use abusive language.