Tuesday, June 06, 2006

Configuring Apache - PHP - MySQL on Windows (WAMP Configuration)

[Download and Install]
1Download Apache, PHP, MySQL
2Install Apache to its default location and make sure IIS is stopped during installation.
3Extract PHP to C:\PHP folder
4Install MySQL
5Create a folder C:\MyWebsite (This is the folder where you want your website to be)



[Setup php.ini]
1Goto C:\PHP folder and rename php.ini-dist to php.ini and open this file.
2Search for "doc_root =" or goto line# 454 and change this to doc_root = "C:\MyWebsite\"
3Goto Line# 461 and change this to extension_dir = "C:\PHP\ext"
4Goto Line# 598 and change it to extension=php_mysql.dll



[Setup httpd.conf]
1Open C:\Program Files\Apache Group\Apache2\conf\httpd.conf file
2Goto Line# 120, change this to Listen 8080
3Goto Line# 228 and change it to DocumentRoot "C:/MyWebsite"
4Goto Line# 238 and change it to <Directory "C:/MyWebsite">
5Goto Line# 321 and change it to DirectoryIndex index.html index.html.var index.php index.htm
6Goto Line# 515 and remove the default ScriptAlias paste the following.
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php .php5
Action application/x-httpd-php "/php/php-cgi.exe"
SetEnv PHPRC "C:/php"


[Testing Your Configuration]
1Goto C:\MyWebsite and create a file index.php
2Open the file and paste this code and save it. <?PHP phpinfo(); ?>
3Open your browser and type http://localhost:8080/
4You should see the complete details of your PHP setup otherwise recheck your configuration.

Share it with others on:

66 Comments:

Anonymous David said...

Excellent tutorial

June 08, 2006 1:17 PM  
Anonymous Cramez said...

I was trying too hard to configure this. Nice tutorial!

June 09, 2006 9:51 AM  
Anonymous cramez said...

digg your site @ http://digg.com/programming/2_minutes_-_WAMP_Configuration_(Windows_-_Apache_-_MySQL_-_PHP)
I added it so that it can help others too!

June 09, 2006 11:04 AM  
Anonymous Anonymous said...

Nice tutorial....

Where is the code for the index.php??? Am I missing something here?

June 10, 2006 2:28 AM  
Blogger Deepak Radhakrishnan said...

Code for index.php added

June 13, 2006 12:31 PM  
Anonymous Seraph said...

I followed the instructions, but am getting the following 'Forbidden' error. Any ideas?

You don't have permission to access /php/php-cgi.exe/index.php on this server.

June 14, 2006 7:40 PM  
Blogger Deepak Radhakrishnan said...

To get rid of the 403 forbidden error: change security settings in the httpd.conf by removing the lines "Order allow,deny" and " Allow from all" in the Directory-tag, which is located just below Documentroot.

June 14, 2006 8:43 PM  
Anonymous Anonymous said...

In the section, [Setup httpd.conf], it reads:
1 ...
2 ...
3 ...
4 Goto Line# 238 and change it to
5 ...

Change Line# 238 to what?
Otherwise, an excellent tutorial...

June 25, 2006 11:29 PM  
Anonymous Anonymous said...

Will this tutorial work for Apache 2.2.2 and PHP 5.1.4? Thanks.

July 01, 2006 12:13 AM  
Blogger Deepak Radhakrishnan said...

Ya. It'll work for Apache 2.2.2 and PHP 5.1.4
Just that the line numbers may change

July 01, 2006 3:12 PM  
Anonymous Anonymous said...

Thanks for the post about the security settings. I was completely getting crazy of that Forbidden-error!

July 05, 2006 3:42 AM  
Anonymous Anonymous said...

For Apache 2.2

Directory /
Options FollowSymLinks
AllowOverride None
# Order deny,allow
# Deny from all
Satisfy all
/Directory

Saludos

July 21, 2006 4:13 PM  
Anonymous Anonymous said...

I followed the instructions but with me when I type http://localhost:8080 it ask if I want to save localhost.

what went wrong?

July 22, 2006 2:18 AM  
Anonymous Anonymous said...

Just install WAMP Server. All in one pack. Download and run the setup.
Link is here: http://www.wampserver.com/en/download.php

July 20, 2007 9:57 AM  
Anonymous <a href="http://www.xanga.com/buy_levitra">Buy Levitra</a> said...

Great article! Thanks.

August 18, 2007 12:31 PM  
Anonymous <a href="http://phentermine1.eamped.com">Phentermine</a> said...

Thanks for interesting article.

August 18, 2007 6:27 PM  
Anonymous <a href="http://web.archive.org/web/20070818071347/freewebtown.com/loans1/payday-loans.html">Payday loans</a> said...

Nice Blog!

August 18, 2007 6:27 PM  
Anonymous <a href="http://searcheng.site.io/index.html">Phentermine</a> said...

Thank You! Very interesting article. Do you can write anything else about it?

August 28, 2007 7:41 PM  
Anonymous <a href="http://buy-levitra--ooz.blogspot.com">buy Levitra Online</a> said...

Very interesting site. Blog is very good. I am happy that I think the same!

September 04, 2007 5:47 PM  
Anonymous <a href="http://search.cnn.com/search?query=site:m1.aol.com/phentermine4">Anonimous</a> said...

Nice! Nice site! Good resources here. I will bookmark!

September 10, 2007 12:23 AM  
Anonymous <a href="http://courses.cvcc.vccs.edu/ENG112_GROSS/_Chat_Room/000008fd.htm">Anonimous</a> said...

Excellent website. Good work. Very useful. I will bookmark!

September 10, 2007 7:58 AM  
Anonymous <a href="http://m2.aol.com/LorenLynn03/index8.html">Maxwells</a> said...

I see first time your site guys. I like you :)

September 10, 2007 10:28 AM  
Anonymous viagra said...

Disaster is likely to wreak havoc in the life of an individual as soon as he becomes victim to erectile dysfunction and the most significant dreadful consequence of erectile dysfunction is that the afflicted man becomes incapable of facilitating erections required for sexual intercourse. The sexual vacuum resulted from erectile dysfunction prompts the sufferer to opt for anti-impotency pills, most especially the viagra medication that was approved by FDA (Food and Drugs Administration) as a clinically effective drug to cure erectile dysfunction in men. Viagra is meant to be administered by patients only after availing of viagra prescription from the doctor. The prescription for Viagra provided by the doctor spells out that the patient suffering from erectile dysfunction seriously need Viagra to treat his disorder and further authorizes the patient to avail of Viagra from the pharmacist.

September 26, 2007 10:19 AM  
Anonymous Anonymous said...

Indulge yourself and find partners for hot Sexual Encounters and Adult Dating at Adult friend finder free dating site!
If you are looking for a one night stand or a casual encounter, then the Adult Swingers Club is where the game is played.
If you practice a different range of sexual and sensual activities then adult personals has the Club for you.
Download over 2000 adult dvd movies, available formats: windows, mpeg, psp and ipod!
Shop for Adult Toys, DVDs and Lingerie and other Erotic Adult Products at adult sex toys shop and adult toys store.

October 26, 2007 9:09 PM  
Anonymous <a href="http://paydayadvisors.org">PaydayLoans</a> said...

NT49wK You have a talant! Write more!

October 30, 2007 10:22 PM  
Anonymous <a href="http://tes.uab.es/MISS/portal_memberdata/portraits/twkgxziok">Auto insurance company</a> said...

yaqohU Good job!

October 31, 2007 8:02 AM  
Anonymous <a href="http://hydrocodone.99k.org/index.php">Hydrocodone</a> said...

xFX6zA The best blog you have!

November 02, 2007 5:23 PM  
Anonymous <a href="http://users2.titanichost.com/buyviagra/467.html">jewish loans</a> said...

auRnr4 Wonderful blog.

November 02, 2007 10:55 PM  
Anonymous <a href="http://free.7host07.com/nmcfgy/69.html">all things new tour review</a> said...

Good job!

November 02, 2007 11:47 PM  
Anonymous <a href="http://fioricet.clanteam.com/?pharma=58">buy domain fioricet onlinefree websitescom soma</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

November 03, 2007 12:33 AM  
Anonymous <a href="http://celebrex.zxq.net/?pharma=1161">celebrex rejuvenation</a> said...

Please write anything else!

November 03, 2007 1:31 AM  
Anonymous <a href="http://m1.aol.com/BrettHead14/88.html">car cheapest in insurance uk</a> said...

Hello all!

November 03, 2007 2:34 AM  
Anonymous <a href="http://users2.titanichost.com/buyviagra/index6.html">buy phentermine tablets buy phentermine</a> said...

Thanks to author.

November 03, 2007 4:06 PM  
Anonymous <a href="http://tramadol.newsit.es/compare-online-price-tramadol.html">compare online price tramadol</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

November 03, 2007 8:44 PM  
Anonymous <a href="http://vicodin.newsit.es/no-medical-records-vicodin.html">no medical records vicodin</a> said...

Wonderful blog.

November 03, 2007 9:46 PM  
Anonymous <a href="http://tramadol.newsit.es/easiest-drugs-tramadol-carisoprodol.html">easiest drugs tramadol</a> said...

Magnific!

November 03, 2007 10:49 PM  
Anonymous <a href="http://phentermine.whdot.com/index10.html">cheap phentermine discount phentermine buy phenter</a> said...

Hello all!

November 03, 2007 11:36 PM  
Anonymous <a href="users2.titanichost.com/amalopra">JohnBraun</a> said...

u7Wmy1 write more, thanks.

November 05, 2007 2:27 AM  
Anonymous <a href="http://users2.titanichost.com/popebatret/index11.html">coupl maried sex</a> said...

Good job!

November 05, 2007 9:35 AM  
Anonymous <a href="http://users2.titanichost.com/inoryum/index13.html">drunk sex videos</a> said...

Nice Article.

November 05, 2007 10:09 AM  
Anonymous <a href="http://users2.titanichost.com/hviler/index12.html">anime sex wallpaper</a> said...

Nice Article.

November 05, 2007 11:58 AM  
Anonymous <a href="http://users2.titanichost.com/olds77/index24.html">her first anal sex vixxxen</a> said...

Nice Article.

November 05, 2007 1:06 PM  
Anonymous <a href="http://users2.titanichost.com/shingro/index12.html">sex amp love</a> said...

Magnific!

November 05, 2007 1:34 PM  
Anonymous <a href="http://users2.titanichost.com/scersi/index4.html">emma watsons sex</a> said...

Magnific!

November 05, 2007 2:08 PM  
Anonymous <a href="http://users2.titanichost.com/t1fielde/index4.html">oswestry massage sex</a> said...

Good job!

November 05, 2007 2:37 PM  
Anonymous <a href="http://users2.titanichost.com/adjutes/index5.html">basic sex positions</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

November 05, 2007 3:18 PM  
Anonymous <a href="http://users2.titanichost.com/adjutes/index4.html">bbc documentary sex</a> said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

November 05, 2007 4:01 PM  
Anonymous <a href="http://users2.titanichost.com/shiconta/index21.html">crazy sex dumper</a> said...

Nice Article.

November 05, 2007 4:35 PM  
Anonymous <a href="http://users2.titanichost.com/gnites3/index32.html">hot sex picks</a> said...

Hello all!

November 05, 2007 5:06 PM  
Anonymous <a href="http://users2.titanichost.com/marymeno/index29.html">public sex porno</a> said...

Thanks to author.

November 05, 2007 5:38 PM  
Anonymous <a href="http://users2.titanichost.com/vadhoms/index32.html">man sex pet</a> said...

What is a free gift ? Aren't all gifts free?

November 05, 2007 6:16 PM  
Anonymous <a href="http://users2.titanichost.com/etooking/index8.html">nikki ritz sex</a> said...

Clap on! , Clap off! clap@#&$NO CARRIER

November 05, 2007 6:53 PM  
Anonymous <a href="http://users2.titanichost.com/swiseny/index34.html">dog sex licking</a> said...

Lottery: A tax on people who are bad at math.

November 05, 2007 7:21 PM  
Anonymous <a href="http://users2.titanichost.com/Lostsoldier3/index14.html">free grandma porn videos</a> said...

Give me ambiguity or give me something else.

November 05, 2007 7:47 PM  
Anonymous <a href="http://users2.titanichost.com/pyzoid/index34.html">books audio sex</a> said...

Please write anything else!

November 05, 2007 8:24 PM  
Anonymous <a href="http://users2.titanichost.com/pyzoid/index9.html">bold sex stories</a> said...

Thanks to author.

November 05, 2007 8:55 PM  
Anonymous <a href="http://users2.titanichost.com/selli83/index21.html">after rash sex</a> said...

Energizer Bunny Arrested! Charged with battery.

November 05, 2007 9:28 PM  
Anonymous <a href="http://users2.titanichost.com/numdaso/index10.html">japan car sex</a> said...

Oops. My brain just hit a bad sector.

November 05, 2007 10:01 PM  
Anonymous <a href="http://users2.TitanicHost.com/porada/get-high-off-hydrocodone.html">get high off hydrocodon</a> said...

I don't suffer from insanity. I enjoy every minute of it.

November 05, 2007 10:31 PM  
Anonymous <a href="http://cialis.whdot.com/index12.html">cialis icos</a> said...

I don't suffer from insanity. I enjoy every minute of it.

November 05, 2007 11:03 PM  
Anonymous <a href="http://frwebgate.access.gpo.gov/cgi-bin/leaving.cgi?to=freewebtown.com/phentermine1">phenterm</a> said...

Hello all!

November 05, 2007 11:40 PM  
Anonymous <a href="http://users2.titanichost.com/numdaso/index21.html">jane review sex</a> said...

Give me ambiguity or give me something else.

November 06, 2007 12:23 AM  
Anonymous <a href="http://users2.titanichost.com/febisko/index20.html">beyonce sex pics</a> said...

I don't suffer from insanity. I enjoy every minute of it.

November 06, 2007 1:03 AM  
Anonymous <a href="http://users2.titanichost.com/topletrufus/index5.html">girlfriend sex video</a> said...

Magnific!

November 06, 2007 1:34 AM  
Anonymous Kleidung Klamotten said...

Thanks for very interesting article. btw. I really enjoyed reading all of your postsabout Klamotten . It's interesting to read ideas about your stuff and Kleidung , and observations from someone else's point of view… makes you think more. Read more about Pattern and Crochet
Visit my Bodybuilding Muskelaufbau Shop . Best regards! Schwule - Gays

April 13, 2008 4:45 PM  
Blogger Sage said...

damn we need captcha on here...

June 30, 2008 11:56 PM  

Post a Comment

Links to this post:

Create a Link