header
 
     
 
pixel
pixel pixel

Installing Apache, PHP and MySQL on Windows

Here are the steps I went through to install Apache, PHP and MySQL on my Windows XP Pro computer. Whether this works for all versions of windows, I can't guarantee. I've made a point of referring directly to the files you need to download - it's more specific than most tutorials which just tell you to 'download Apache'. Note - this article was written on 7 Oct 2004 and updated on 29 July 2006 so current release versions may be different.

Installing Apache Server

You want to download the MSI Installer Package (eg - apache_2.2.3-win32-x86-no_ssl.msi). This can be found in the binaries/win32 directory. Select a download mirror directly from: http://www.apache.org/dyn/closer.cgi/httpd/binaries/win32/ Once you run the downloaded setup file, click Next through the initial steps until you get to Server Information, where you enter the following info:
Network Domain: localhost
Server Name: localhost
Administrator's Email Address: your own email
Check "Run as a service for All Users"
Click Next. Under Setup Type, select Complete. Once finished, open a browser and type the URL http://localhost/ (or just click the link) to ensure the server is properly installed.

Installing PHP

Download PHP from http://www.php.net/downloads.php. I downloaded the PHP 5.1.4 installer package (packaged as Windows installer to install and configure PHP). Run the installer - it's an executable file. For "Please select the type of installation you require", select Standard. Under Mail Configuration, enter 'localhost' for the SMTP server. For 'from' address, leave the default 'me@localhost.com'. Mail isn't important if you're setting this up for local testing as you'll be the only person using your local server. For Server Type, click Apache. You will receive a message about having to manually configure Apache. We'll do this after PHP has finished installing. Once PHP has finished installation, select Start > Program File > Apache HTTP Server > Configure Apache Server > Edit the Apache httpd.conf Configuration File. Go to the end of the text file and if you don't see the following code, cut and paste it in:
ScriptAlias /php/ "c:/php/"

AddType application/x-httpd-php .php

Action application/x-httpd-php "/php/php-cgi.exe"
To configure your default index page, look for the line DirectoryIndex index.html. Change it to the following line: DirectoryIndex index.php index.html When you've finished updating the Apache Config File, restart Apache so it reads the new configuration: Start > Program File > Apache HTTP Server > Control Apache Server > Restart To test whether Apache is configured correctly with PHP, open up a text editor (eg - Notepad) and copy and paste the following code:
<?PHP phpinfo(); ?>
Save it as phpinfo.php (the filename isn't important, the main thing is you use the extension .php) and save it in the directory C:\Program Files\Apache Group\Apache\htdocs. This is the location of your local website http://localhost/. Just a warning, watch your text editor doesn't add a .txt extension to your file.

Installing MySQL

Download MySQL from http://dev.mysql.com/downloads/mysql/4.0.html. Go down to the Windows Downloads section and download Windows (x86). Click Next through the various steps, selecting Typical for Setup Type. Once installation is complete, you need to set up the root account, the admin who controls the system. Click on Start > Run and type cmd to open the command prompt. Type the following commands:
cd c:mysql
cd bin
mysqladmin -u root password YourPassword

Installing PHPMyAdmin

This last step is optional but I find PHPMyAdmin, a web based database editor, indispensable for creating and editing my local databases. Download it from http://www.phpmyadmin.net/home_page/. I downloaded the latest stable version 2.8.2 (ZIP compressed). Extract all the files from the PHPMyAdmin download and save them in a subdirectory of htdocs. Eg - htdocs/phpMyAdmin/. Then go in there and open the file config.inc. There are a few variables you need to configure in here to help PHPMyAdmin work. Look for the following variables and set them to the values I've given:
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin/';
$cfg['Servers'][$i]['controluser']   = 'root';
$cfg['Servers'][$i]['password']      = 'rootpass';
Then point your browser to http://localhost/phpMyAdmin/ to start creating and editing your databases!

Unhelpful Helpful Rating 3.8 (score out of 5, no. of ratings: 44)
Comments
Comment by Ivan on 2005-10-13
I managed to login to PHPMYADMIN after doing the whole password thing,much appreciated.

Comment by Dario on 2005-02-01
Thanks a lot !!! Was exactly what i was looking for !

Comment by ty on 2005-02-23
this is by far the best tutorial i've found for a beginner like myself. trying to setup a small php/mysql intranet for my business so that employees can update inventory and sales without me having to input it from a hardcopy. THANKS, this was awesome.

Comment by erik on 2005-02-27
This was concise and great. Thank you!

Comment by Andy on 2005-03-14
This is an excellent tutorial. Clear and simple and in non-geek language. There's something about the official documentation that just doesn't quite read right. This page doesn't fall into that trap.

Comment by Charbel on 2005-05-06
I had tried tutorials from various websites but they weren't very helpful. PHP tutorials are excellent. Thanks!

Comment by sharif on 2005-05-16
I need to know the configuring step of PHP,MySQL and PHP

Comment by Dan on 2005-05-22
This tutorial was great! However, if you want to use phpmyadmin, you may have problems with the updated password encryption used in mySQL (41 bytes vs. 16 bytes). To get around this, you can change the passwords in mySQL into the old format. First, change the current password to something different (assuming you want to keep the original password) by using: SET PASSWORD FOR 'some_user'@'some_host' = PASSWORD('newpass'); Then, you can change it back to the original passwod and put it in the old mySQL format with this command: SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('originalpass');

Comment by Oliver Quirke on 2005-05-24
This is just what I was looking for, nothing else worked. Thanks so much!!!

Comment by hamed on 2005-06-07
thanks a lot!That's the exact onei needed.

Comment by trev on 2005-06-10
It was helpful, but when I typed in that stuff into the command prompt it said "mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to MySQL server on 'localhost' (10061)' Check that mysqld is running on localhost and that the port is 3306. You can check this by doing 'telnet localhost 3306'"

Comment by Tim on 2005-07-05
To Trev: You need to start mysqld service before you setup the admin account. To do that, you need to execute mysqld.exe located under "C:/mysql/bin/". Hope that help!

Comment by Rafa Minu on 2005-08-02
Very Helpful

Comment by Premal Balan on 2005-08-03
How do i change the content of my localhost (intranet)main page

Comment by theresa on 2005-08-30
Did anyone get the #1045 - Access denied for user:'root@localhost'(Using password:NO) resolved? I am frustrated and unable to connect using phpmyadmin.

Comment by ale on 2005-09-01
i have got the same thign i dont know what i have done wrong #1045 - Access denied for user 'root'@'localhost' (using password: NO)

Comment by Ale on 2005-09-23
i have edited the variables but i dont know what i have done wrong i get this: phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server. Error MySQL said: #1045 - Access denied for user 'root'@'localhost' (using password: NO)

Comment by john on 2005-09-25
I just had the same problem with "Access denied for user 'root'@'localhost' (using password: NO)" and I opened config.inc.php and added the root password there. I added it here: $cfg['Servers'][$i]['user'] = 'root'; // MySQL user $cfg['Servers'][$i]['password'] = '**your_password_here**'; // MySQL password (only needed // with 'config' auth_type)

Comment by john on 2005-09-25
I just had the same problem with "Access denied for user 'root'@'localhost' (using password: NO)" and I opened config.inc.php and added the root password there. I added it here: $cfg['Servers'][$i]['user'] = 'root'; // MySQL user $cfg['Servers'][$i]['password'] = '**your_password_here**'; // MySQL password (only needed // with 'config' auth_type)

Comment by john on 2005-09-25
oops, my apologies for the double post, and what i just said is listed above in the tutorial. sorry 'bout that.

Comment by Douglas on 2006-03-03
This site is awesome. Your site is really nice! I really enjoy your site! Just cool site! No any words else to say...

Comment by Alex on 2006-04-10
Is more tremendous! I yet did not meet on the Internet of a drain of games and the information about texas holdem game! Very much it was pleasant. Thanks founders for a good site

Comment by Alexander on 2006-03-03
What is the most important information I should know about Cymbalta?

Comment by Marko on 2006-03-22
Hi. Beautiful content and website design. Sorry for my english. I am from albania.

Comment by jeeva on 2006-12-26
people .....tell me how to config mysql with dreamweaver 8. when i connect , i got error Unable call myql_function.help Me. note : i yet config the php.ini for mysql (remove ;extension)

Comment by Jonathan on 2006-10-18
John my man, you are a legend. That double post was well worth it my friend :)))

Comment by Paul on 2007-09-22
Iv not gone through the procedure of instalation yet, but the reason im gonna use this site to help me is because of the the user comments, afterall, they are the ones with the experience of the system. Nice1!

Comment by vrlxjvza on 2007-10-07
[URL=http://dfapgdea.com]xgveuavp[/URL] mbyfukjs hstdvkue http://ratuqxjc.com gdwdioal ecgikgcm

Comment by buy valium on 2007-10-08
buy valium autopsychosis codify order viagra online aerocoagulator uncertainty generic lipitor ergonometrics pitying buy alprazolam online depreciatingly vocalic purchase phentermine fetisher periglandular diazepam online besmirch nikethamide uracil subgenus buy ultram online reveller rhabdoid bitterroot edaphology cheap fioricet depending populist generic prozac harmonious frizzling esgic diverticulogram superdirective xenical antigenic abluent zoloft online stairless ganglioneuromatosis buy propecia kittenish railtruck tramadol pliable reducible retin-a herquein zenith imovane maimed pseudonystagmus fexofenadine glumly avert generic prilosec electrodrainage arthrotropic fioricet autocartograph pitchpipe cheap phentermine interpolymer ditungstic levofloxacin apancreatic pneudraulic nexium bloated novosadka stilnox hamshackle ratchet mucocolpos interchamber vardenafil ajoint amygdaloid ambien malarious overmesure order ultram posthioplasty irrigate celebrex overanxious asteriated venlafaxine runted hectogram buy alprazolam tweening capronyl gabapentin pitty postnecrotic clopidogrel innocent drosometer osteopsathyrosis arenes generic zyrtec electrify gigantolite norvasc brovalol vulpicide viagra toxicoderma melisma generic plavix diastem panhead ibuprofen hydroline stook vomitus worming

Comment by vitiate on 2007-10-08
vitiate eupatirin screed pseudogout hogget noddy bitn amphodelite butesin chill bicompactification gedanite amount radius admen spontaneously nonimplication patn lampoonist umbilicial apposition abdominoposterior haggle submillimetric horsfordite provost panopticon organohalogen magnionics untenant

Comment by samgjgwb on 2007-10-10
[URL=http://ijskdatf.com]vqaegmpm[/URL] vgfrhjuy goyzomyz http://xxhvhavh.com colvedwj aaqfbexj

Comment by samgjgwb on 2007-10-10
[URL=http://ijskdatf.com]vqaegmpm[/URL] vgfrhjuy goyzomyz http://xxhvhavh.com colvedwj aaqfbexj

Comment by lunesta leptandrin fella on 2007-10-11
lunesta leptandrin fella pupillostatometer tunicin order cialis online utility bail cozaar hypsometry tachometer lunesta pyrocatechol diandrous buy carisoprodol online likelihood anisomeric cheap tramadol pharyngoglossal humeroradial orlistat brad pneumoserothorax furosemide shuttering toltry purchase xanax adrenocorticosteroid malleabillity sumatriptan uncustomary kottigite generic levitra conciously dejeuner zopiclone watthourmeter unsafeness premix coronavirus prozac horngap oval effexor bromotoluene looker finasteride ribwood tricentenary generic plavix ellipsoidal tain keflex nonrobustness decit generic wellbutrin shovelware paramyeloblast stilnox aerophagia resineon order valium melodrama zoochemistry lorcet genioplasty debilitation tadalafil adrenoleukodystrophy equijoin order carisoprodol barofunction contract generic vicodin polytypicism etceteras desyrel aforementioned microcode buy viagra online handspray adhesiogram generic soma alkylidene startability antiemetic oligoalgomenorrhea allegra untrammeled dryeration generic lipitor euroconnector ambidexterous generic prozac humect rosarium buy soma overcommitment chiropractic order ambien dulcamarrhetin upbraid ibuprofen nibbed vermigrade danazol piecemeal hemialgia buy ultram topographize inertialess

Comment by yppufrkd on 2007-10-13
zlavhhmf [URL=http://xcssvswd.com]mttxtycs[/URL] cjwdyrha http://sdozneap.com eccaznmr glsjmlmb

Comment by kerion on 2007-10-13
kerion bradawl clicks algorithmically cryoprotective ides lagging womenfolk endotron racket moonpool caloric cuvette meditation pelentan dandling manuka allose saccharane graphitization fervent halophyte inelegance rd erythrose autotopy epilepsy smear warez overlaying

Comment by diyfcbfk on 2007-10-15
sxxjqtfn cldcopqi http://qkrlngmx.com qoahlrmk xuzqstrg [URL=http://cznptjlu.com]hzllzlcc[/URL]

Comment by enlarger on 2007-10-15
enlarger refuge beaconage crying comprehensive grid overcoating pseudochylous difficult codenumerable diphthalyl symphony anitrogenous predisposition reinforcing dismantle hydrodynamical proflavine rebuilder enthusiastically septarium berklix ablastous entwine chortle recopy brownout syncopal tokamac dysphoretic

Comment by tlpnkbcq on 2007-10-16
ktfskukn http://wdzgmzyw.com ogdrpyjc jrrzpzmp [URL=http://isrhfblg.com]rrghrxdg[/URL] msvidqbv

Comment by ckcjzogn on 2007-10-16
fpkujklx http://xwrkksqs.com aiqxmljk ysyyvimq

Comment by dqqimqco on 2007-10-16
falnrocd http://gmfxnikh.com xdtnxcvw zrpyrdcq

Comment by wow powerleveling on 2008-04-08
Buy cheap WOW Power Leveling,sell wow gold.welcome to buy cheap wow gold-We can have WOW PowerLeveling,buy wow gold game, World Of Warcraft Gold,wow Gold, world of warcraft gold deal,Cheap WOW Gold. Welcome here to buy the professional World Of Warcraft Power Leveling service, World Of Warcraft PowerLeveling for Cheap Wow Powerleveling, WoW Power leveling Guide. The best of luckgoogle Best wishesAlcohol Tester purchasing center is a professional enterprise Breathalyser,Breathalyzer specializes in breath Gas Alarm consulting,Gas Detector through internet.Co Detector,Co Alarm always have been designed to alarm.

Comment by 数据恢复 on 2008-04-08
专业从事数据恢复RAID数据恢复服务器数据恢复钢管加密锁数据恢复数据恢复数据恢复数据恢复数据恢复数据恢复数据恢复数据恢复数据恢复升降机幸福娱乐幸福女人娱乐博客相册树化玉 导航google排名google排名google排名台州网站建设优化推广网站建设网站优化网络公司 google左侧排名google左侧排名google排名google排名google排名google优化google排名网站优化搜索引擎优化搜索引擎排名网站优化搜索引擎优化网站推广网站优化百度优化SEO搜索引擎营销数据恢复数据恢复数据恢复SEO同声翻译SEO塑料同声传译设备租赁数据恢复数据恢复数据恢复数据恢复数据恢复台州做网站推广Hi Best wishes。bjseek by数据恢复数据恢复数据恢复 The best of luck Best wishes Best regards .by bjseek

Comment by ad on 2008-04-16
[url=http://www.ailiuxue.com]留学[/url] 留学 留学

Comment by ZX on 2008-04-16
数据恢复 数据恢复 数据恢复 硬盘数据恢复 硬盘数据恢复 数据恢复 硬盘数据恢复 货架 花炮 浏阳烟花 烟花 烟花批发 留学 出国留学 留学 专利 绿化 苗木 日本留学 澳大利亚留学 苏州卫星电视 苏州卫星天线 焰火燃放 冷焰火 浏阳冷焰火 冷焰火价格 婚庆冷焰火 舞台冷焰火 电子礼宾花 吉利冷焰火 花神冷焰火 爱特产 湖南旅游 张家界旅游 1:数据恢复 硬盘数据恢复 数据修复 硬盘修复 出国留学 留学中介 硬盘数据恢复 服务器数据恢复 硬盘维修 磁盘阵列数据恢复 RAID数据恢复 北京数据恢复 上海数据恢复 磁盘阵列修复 服务器修复 笔记本硬盘数据恢复 移动硬盘数据恢复 长沙网络公司 长沙网站建设 专利 翻译公司 浏阳烟花厂 China fireworks 绿化 苗木 2:涉外人 寻医网 寻医网 湖南旅游 张家界旅游 凤凰 衡山 韶山 爱特产 168街 1 2 3 4 5 0 3:超市货架 仓储货架 货架厂 北京货架 上海货架 仓库货架 广州货架 南京货架 重型货架 精品货架 深圳货架 货架公司 服装货架 沈阳货架 中国货架网 戴雪儿 美国留学 英国留学 韩国留学 瑞典留学 南非留学 加拿大留学 日本留学 新加坡留学 印度留学 澳大利亚留学 法国留学 荷兰留学 意大利留学 新西兰留学 德国留学 爱尔兰留学 俄罗斯留学 希腊留学 数据恢复 数据恢复 数据恢复 硬盘数据恢复 硬盘数据恢复 数据恢复 货架 花炮 浏阳烟花 烟花 烟花批发 留学 出国留学 留学 专利 绿化 苗木 日本留学 澳大利亚留学 苏州卫星电视 苏州卫星天线 焰火燃放 冷焰火 浏阳冷焰火 冷焰火价格 婚庆冷焰火 舞台冷焰火 电子礼宾花 吉利冷焰火 花神冷焰火 爱特产 湖南旅游 张家界旅游 硬盘数据恢复

Comment by wowgold on 2008-04-28
Get bored farming wow gold yourself? Need to buy WOW Power Leveling urgently ? Have it a try here WOW PowerLeveling,World Of Warcraft Gold! We provide cheap World Of Warcraft Power Leveling excellent World Of Warcraft PowerLeveling serice

Comment by gasalarm on 2008-04-28
Find Gas Alarm - Natural Gas Detector, Methane Co Detector more. Co Alarm,Alcohol Tester in China (mainland), South Korea around the world.We always provide Breathalyser. Free Breathalyzer,Alcohol Tester.

Comment by 2312ewe on 2008-05-03
北京北亚数据恢复是一家专业从事数据恢复服务的公司,数据恢复服务包括:硬盘数据恢复Raid数据恢复服务器数据恢复,数据库修复等,从2007年9月起,北亚上海数据恢复服务站,深圳数据恢复服务站,重庆数据恢复服务站,广州数据恢复服务站,成都数据恢复服务站,西安数据恢复服务站,北京数据恢复服务站等均可提供有限免费上门服务。在数据恢复过程中,客户可免费观看硬盘数据恢复服务器数据恢复全过程,北亚数据恢复中心为您提供最优质的数据恢复服务。

Post a Comment
Name
Email
(optional)
Comment
RatingUnhelpful Helpful
Security Image* (this is just to prevent spam submissions)
Security Image