Jump to content

PHP5 configuration with Apache 5.5


Recommended Posts

I have ... pache5.x downloaded/

You mean Apache2.0.x or Apache 2.2.x? There is no Apache5!

 

To install Apache and PHP on Windows follow these steps:

 

First download the .msi installer for Apache2.2.x from apache.org and download the zippied binaries package for PHP5.x from php.net (do not download the PHP installer).

 

Once downloaded. First install Apache by running the .msi installer. During the installation process Apache will ask for your Network Domain and Server Name. Enter localhost for both. You can use any address for the Admin Email address.

 

Run through the remaining steps. Note: I prefer to install Apache to C:/Server/Apache - this is archived by clicking the Custom install button after the above step.

 

Once Apache is installed. Extract the contents of the downloaded php zip package to C:/Server/PHP.

 

The next step is to find Apaches configuration file (httpd.conf). This located in Apaches conf/ folder (eg C:/server/Apache/conf). Scroll to the bottom of the file and add the following lines

LoadModule "C:/Server/PHP/php5apache2_2.dll"
PHPIniDir "C:/Server/PHP"

AddType application/x-httpd-php .php

 

Now save the httpd.conf and restart Apache via the Apache Monitor in the taskbar. Apache and PHP are now installed and ready to use.

 

Usuage

Save all files for your site (eg html, php, images, css, js etc) within Apaches htdocs/ folder (C:/Server/Apache/htdocs - remove any existing files from there though).

To access your site go go to http://localhost/

Whenever you make any changes to the httpd.conf/php.ini make sure you always restart Apache.

 

Other things you should do is to:

- rename the php.ini-recommended file in C:/Server/PHP to just php.ini

- Add C:/Server/PHP to the PATH Environment Variable.

- configure PHP to your needs via the php.ini

 

Thats it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.