Many web developers want to run Apache and PHP on their own computer. This article gives a step by step guide on how you can install and configure PHP5 to work together with the Apache HTTP Server on Windows Vista.
Apple Store The Promenade Shops at Briargate(719) 522-4460
1685 Briargate Parkway, Suite 315 Colorado Springs, CO Apple Store The Promenade Shops at Briargate (719) 522-4460
1685 Briargate Parkway, Suite 315 Colorado Springs, CO
Services Design/Publishing, Video/Multimedia, Web Solutions/Internet, Carry-in Service (Mac Only)
OfficeMax303-752-0040
14030 E. Mississippi Ave Aurora, CO OfficeMax 303-752-0040
14030 E. Mississippi Ave Aurora, CO
Hours M-F 8-9, Sa 9-8, Su 10-6*
OfficeMax720-733-1942
5650 Allen Way, Suite 110 Castle Rock, CO OfficeMax 720-733-1942
5650 Allen Way, Suite 110 Castle Rock, CO
Hours M-F 8-9, Sa 9-8, Su 10-6*
Staples303-703-4481
6767 S. Vine Street Centennial, CO Staples 303-703-4481
6767 S. Vine Street Centennial, CO
Recycling Services Recycling Desk $3 Ink & Toner Credit Hours Mon-Fri: 8:00am-8:00pm Sat: 9:00am-7:00pm Sun :10:00am-6:00pm
Staples303-346-8957
9449 S University Blvd Highlands Ranch, CO Staples 303-346-8957
9449 S University Blvd Highlands Ranch, CO
Recycling Services Recycling Desk $3 Ink & Toner Credit Hours Mon-Fri: 8:00am-8:00pm Sat: 9:00am-7:00pm Sun :10:00am-6:00pm
Apple Store FlatIron Crossing(720) 479-0465
One West Flatiron Crossing Drive Broomfield, CO Apple Store FlatIron Crossing (720) 479-0465
One West Flatiron Crossing Drive Broomfield, CO
Services Design/Publishing, Video/Multimedia, Web Solutions/Internet, Carry-in Service (Mac Only)
OfficeMax303-651-7750
1120 Ken Pratt Boulevard Longmont, CO OfficeMax 303-651-7750
1120 Ken Pratt Boulevard Longmont, CO
Hours M-F 8-9, Sa 9-7, Su 11-6*
OfficeMax303-722-1411
343 South Broadway Denver, CO OfficeMax 303-722-1411
343 South Broadway Denver, CO
Hours M-F 8-9, Sa 9-8, Su 10-6*
Staples719-545-1545
1411 Highway 50 W Pueblo, CO Staples 719-545-1545
1411 Highway 50 W Pueblo, CO
Recycling Services Recycling Desk $3 Ink & Toner Credit Hours Mon-Fri: 8:00am-9:00pm Sat: 9:00am-7:00pm Sun :10:00am-6:00pm
Staples720-981-0276
8055-3 West Bowles Ave Suite 3 Littleton, CO Staples 720-981-0276
8055-3 West Bowles Ave Suite 3 Littleton, CO
Recycling Services Recycling Desk $3 Ink & Toner Credit Hours Mon-Fri: 8:00am-9:00pm Sat: 9:00am-7:00pm Sun :10:00am-6:00pm
|
Steps
- STEP 1: DOWNLOAD CORRECT VERSIONS OF PHP-5.2.5 AND APACHE-2.2.8.
- To download apache 2.2.8, go the website http://httpd.apache.org/download.cgi and then find and click on apache_2.2.8-win32-x86-no_ssl.msi in the page and then click on save. Choose the path where do you want to download and save the file.
- To download php 5.2.5, go to the website http://de.php.net/downloads.php. In particular, download the zip package from the "Windows Binaries" section that is click on PHP 5.2.5 zip package. (Warning: Do not get the installer.) You should be directed to a page where you have mirror options to download. You can choose any option from the recommended mirrors which will be automatically detected. Click on that mirror and then download and save it to your hardrive.
- Now that you have downloaded the required files, let us install them on by one.
- STEP 2: INSTALLING APACHE 2.2.8
- Double click on the installation file (apache_2.2.8-win32-x86-no_ssl).
- Click on next.
- Select ?I accept the terms in the license agreement? and then click next. Click next again.
- On server domain fill ?localhost?,
- Server Name box write ?localhost? and
- Administrator?s Email Address write your own email addresss.
- Then select ?for all users, on Port 80, as a Service ? Recommended? and then click on next.
- Select custom setup type and then click next.
- Change the destination folder to ?C:\apache? and then click on ok. Then click on next. Finally click on install.
- Apache webserver should install in few minutes. Click on finish.
- STEP 3: TESTING IF APACHE IS SUCCESSFULLY INSTALLED.
- To check if apache has been successfully installed in your windows pc you need to open a web browser and then on the address bar type ?//localhost? and then hit enter. You should see a page that says ?It Works!? on the top left hand corner.
- STEP 4: INSTALLING PHP 5.2.5
- Right click on the zip folder ? php-5.2.5-Win32? and then click on ?Extract all?. On the Destination folder type ?C:\php? then click on Extract.
- STEP 5: CONFIGURING APACHE 2.2.8
- Now that you have successfully installed both apache web server and php scripting language your next most important task is to configure them so that they can recognize each other.
- Go to your apache installation path, and then open httpd.conf which is located under the conf directory ?C:\apache\conf? double click on httpd.conf file. Find (ctrl+F) 'loadmodule'. After the last line of the loadmodule section type: LoadModule php5_module C:/php/php5apache2_2.dll
- After you have done look for <IfModule mime_module> and then add the following lines
- AddType application/x-httpd-php .php
- AddType application/x-httpd-php-source .phps
- before the closing statement </IfModule> for mime_module
- After that on the same page find <IfModule dir_module> and then add DirectoryIndex indes.html index.php before </IfModule> if it already does not exists.
- Also add the following line ?PHPIniDir ?C:/php? to the bottom of the file.
- After you have done that save the file and close it.
- STEP 6: CONFIGURING PHP 5.2.5
- Inside the C:\php find php.ini-recommended and then rename it to php.ini. Open that file and then inside the file find the following and replace it as follows:
- doc_root = C:\apache\htdocs
- extension_dir = ?C:\php\ext?
- Then save it. After that go to start menu->> All Programs ->> Apache HTTP Server 2.2 ->> Control Apache Server ->> Restart. This should restart the apache server.
- STEP 7: TESTING IF APACHE AND PHP ARE CONFIGURED SUCCESSFULLY.
- To check if apache and php are configured successfully go to ?C:\apache\htdocs? and open a new text document. In that text document type ? <?php phpinfo(); ?>? and then Save As: File Name ? phpinfo.php and save as type ?All Files?. And then click on Save. Now you have done that go to new web browser and then type ?//localhost/phpinfo.php?.
- If you get the following page then you have successfully downloaded, installed and configured php 5.2.5 and apache 2.2.8.
Article provided by wikiHow, a wiki how-to manual. Please edit this article and find author credits at the original wikiHow article on How to Install and Configure Php 5.2.5 and Apache 2.2.8 in Windows Vista. All content on wikiHow can be shared under a Creative Commons license.