April 19th, 2009
Tutorial : Installing Apache 2.2.11, PHP 5.3, MySQL 5.1.34 & PhpMyAdmin 3.1.4 in Windows Vista/XP
The most recent version of this tutorial has been completely re-written at WebDev Codex.
Learn how to Install PHP 5.3,
To view the latest version, Goto Screencast #1 : Installing Apache 2.2, PHP 5.3, MySQL 5.1 & PHPMyAdmin 3.2 for Windows 7/Vista
If you want to see the screencast of this tutorial, then goto
Screencast #1 : Installing Apache 2.2, PHP 5.3, MySQL 5.1 & PHPMyAdmin 3.2 for Windows 7/Vista
Not everyone would spend money online to buy webspace just so that they can test out how their latest application works, Well… Welcome to Vision Master Designs Blog. This tutorial will teach you to set up a developer environment for PHP/MySQL in your computer in no time.
Index :
- Page 1 : Introduction
- Page 2 : Create Directories & Install Apache
- Page 3 : Install PHP5 & Configure php.ini
- Page 4 : Configure Apache 2.2
- Page 5 : Installing & Configuring MySQL5
- Page 6 : Installing & Configuring PhpMyAdmin
If you are aware of the basics then Click Here to jump below, else read on.
Normally we can view HTML pages on our computer without the need of uploading them to the server, since HTML is a Client Side Language. You don`t need any extra software to view html files, just any browser will do the trick.
But if you want to make your pages dynamic using any Server Side Language (PHP,ASP,JSP) & want to the see the results then you must upload the file to the webserver which supports that language so it can execute the file & return the results on your browser
We can set up a developers environment from which you can create and execute PHP/MySQL scripts by installing the above mentioned applications.
- Apache HTTP Server (2.2.11): The best open source webserver. You need this to turn your humble computer to a powerful webserver to execute your applications.
Direct Download apache_2.2.11-win32-x86-no_ssl-r2.msi
Apache Download Page – Please Download the Win32 Binary without crypto (no mod_ssl) (MSI Installer) – apache_2.2.11-win32-x86-no_ssl.msi~ 4.3MB - PHP (5.2.9) : One of the most powerful web programming languages.
Direct Download PHP 5.2.9 -2 zip package
PHP Download Page – Download the PHP 5.2.9 – 2 Zip package ~ 10MB - MySQL (5.1.34) : One of the best DBMS packages which is free.
The latest version is 5.1.34 which is stable and used in production servers. Although MySQL 5.1 and MySQL 6 are also available as beta releases, they are not used in production servers as of now.
MySQL Download Page – Please download Windows ZIP/Setup.EXE (x86) 5.1.34 ~ 35.2MB - PhpMyAdmin (3.1.4) : Used to manage your MySQL databases directly using your web browser.
Direct Download phpMyAdmin-3.1.4-all-languages.zip
PHPMyAdmin Download Page – Please download the latest release from the 3.x rooster.
The above downloads are compatible with Windows Vista/Vista SP1 (32 bit OS).















February 26, 2009 at 10:05 am
@roger
I hope you have given root as username and password while configuring mysql.
you have to type root as both username & password while logging in to pma.
February 26, 2009 at 10:02 am
@Eduardo
This shouldn`t much of a problem.
Which version of mysql, php and phpmyadmin have you installed ?
February 26, 2009 at 4:22 am
im having trouble with the httpd-vhosts.conf step. i dont understand what i should do or edit. and my notepad soesnt allow me to edit the file as well
please help
February 26, 2009 at 10:10 am
Hey sv,
httpd-vhosts.conf has your virtual server configuration i.e what virtual domain name you`ll be using and which directory to access to retrieve files.
If you are having problems editing httpd-v-hosts.conf, before editing you have to firstly disable UAC (User Account Control) from Control Panel -> Users, secondly stop Apache from running in the task bar.
February 25, 2009 at 10:06 pm
Hi, I got the following error at the login page http://www.myserver.dev/pma/index.php
How can I solve this issue?
#1045 – Access denied for user ‘root’@'localhost’ (using password: YES)
Username:
Password:
Cannot load mcrypt extension. Please check your PHP configuration.
February 25, 2009 at 9:07 pm
Hi,
I instaled the WAMP combo, but I have a message in the footer of my phpmyadming homa page: “Your PHP MySQL library version 5.0.51a differs from your MySQL server version 5.1.31. This may cause unpredictable behavior”
What can I do please?
February 24, 2009 at 12:23 pm
@Jayant kumar gupta
save index.php with ” (“index.php”) in notepad then it will work
February 23, 2009 at 10:04 pm
awesome…thank you very much!
February 23, 2009 at 7:25 pm
@Jayant kumar gupta
Please rename the file index.php.txt to index.php
June 17, 2009 at 12:45 pm
I got the same error, when i rename the file to index.php this text came out
Did I left anything?
February 23, 2009 at 7:15 pm
I done all the step which are written in your website
and after visiting site http://myserver.dev/ i get result
Index of /
index.php.txt
here index.php.txt is link.If i click on this following
code is shown
help me here what wrong step i done.
February 20, 2009 at 11:58 pm
@julia
Can you temme what error you are getting ? does your site have any .htaccess file ? does the main page depend on this file ?
I would require more info then perhaps I can help you out.
Regards
February 20, 2009 at 6:02 pm
Thank you so much for this clearly written and understandable guide. I was able to set up the developer environment. My site is an established oscommerce site that I am transferring to my computer. I can acces the admin side but am not able to access the site itself. Any ideas?
February 19, 2009 at 11:45 am
@Stu Mitchell
Glad It worked out for you Stu. Cheers
February 18, 2009 at 6:07 am
Great post, thanks very much – I had had problems with trying to install these myself, but this tutorial (as
long as you follow it to the letter!) – got me working within the hour. Cheers again.
February 16, 2009 at 8:11 pm
@Phil
Solved this, issue was working with the wrong config file along with a few small directory issues on my
machine. Everything else took some time but went relatively smooth – ready to rock on the code now
thanks guys!
February 16, 2009 at 7:10 am
Thanks for this post – interesting slant on things…
February 16, 2009 at 2:48 am
Hi I think everything is running okay, but when attempting to login to phpMyAdmin I am hitting an error
loading the ‘mcrypt’ ext. … any ideas? It also seems that root/root isn’t allowing me to login, but without
understanding completely I believe these two issues are in fact a single error in my code.
Thanks for this article, all the pics, and any help on this issue!
February 3, 2009 at 12:36 pm
This Tut is really great. I have completed easily all the steps.
I am not sure about what is missing.
My apachi server is working fine and green button is displayed after every start/restart.
MySql setup was also completed without any error.
When ever I run http://www.myserver.dev It shows the message “Page Not Found”
where as my http://localhost is working fine.
Please let me know what to do to move forward.
January 30, 2009 at 10:33 pm
I tried the MySQL server Instance Configuration Wizard and rebooted while turning Norton and Windows firewall off but MySQL & MySQLi are still not showing up as in step 4. The same problem with Liam! Any help please.
January 30, 2009 at 5:51 pm
Excellent Tut, thank you…
Only problem I have is the Mysql & Mysqli information is not showing up in PHP info page..
I’ve tried re-installing Mysql many times, and followed the steps..but no luck..
Appreciate any help
January 28, 2009 at 8:05 pm
This is a great tutorial indeed. After days of trying, I finally have everything set up. My only problem is that mysql & mysqli is not showing up as in step 4 , bullet 10. Would you please help. Would it be with my firewall setting? I tried to turn Norton off with no luck.
Lucson
January 28, 2009 at 7:03 pm
Hi again
Following my last request for help; I can use the publc_html area for running html and info.php pages (also other simple php pages) but it seems that every time I try to run a php page that uses a mySQL table, i get a http 404 error, everything else seems to work. Has anyone else experienced this? has anyone got a work around please…
January 28, 2009 at 2:16 pm
Really this is a great tutorial; Now I am able to have all 4 parts working.
God Bless You …
January 27, 2009 at 9:45 am
Awesome…. tons of thanks man… never thought I can ever reach this point…. thanksssssssssssssss
January 26, 2009 at 2:55 am
Thanks for the excellent tutorial; I have installed all four applications and have everything (seemingly) working as per the tutorial. I have exported a previuosly developed website (dreamweaver cs2) into cs3 but cannot get any of the php pages to run. The error I get is
This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.
It also states that the most likely causes is the that the website is under maintence or there is a programming error. newly created php pages such as phpinfo work fine. The previous site was developed about 18 months ago so on older versions of apache, mysql and php.
your help is greatly needed
January 20, 2009 at 3:13 pm
hi Michael
wel thnx for this tutorial..
i had step by step all things which u had written in this tuts…
but at the last of step 4 , when we are checking the php settings are correect or not then i m not able to get the output …
but wen i m writing the http://localhost in the address bar i get “IT Works!” but when i write http://www.myserver.dev then i m getting the “address not found”
i m using windows vista home premium
apache – 2.2 .11 no_ssl
php – 5.2.8 zip
mysql – 5.2.8
phpmyadmin – 3.1.1
i m urgently reqiured the settings
January 20, 2009 at 9:06 am
Awesome tutorial!!! Life would be easier if we had more of you. I do have somewhat of a dilema. My PHP appears to be working but I cant get to it without http://locey-pc.gateway.2wire.net:8080/phinfo.php. How come i cant get through the “server” directory that I created??? I have the following in my httpd.conf file.
ServerName LOCEY-PC.gateway.2wire.net:8080
DocumentRoot “C:\server\www\myserver.dev\public_html\”
ServerAdmin admin@gateway.2wire.net
Suggestions??
January 20, 2009 at 2:58 am
@jean
yeh i am unable to use mysql_connect() function when i run file following error shows
Fatal error: Call to undefined function mysql_connect() in C:\Server\www\myserver.dev\public_html\mysql_connection.php on line 3
i have done every step in tutorial but still this problem is .
ash
January 14, 2009 at 5:30 pm
Hi i’ve mentioned this before but will mention it again install wamp server. it has everything you need and more the one who will try this out will not get disapointed.
enjoy
January 14, 2009 at 4:57 pm
I’m having the same problem logging into myphpadmin.
Here is my config file:
Here is the error I get:
#1045 – Access denied for user ‘Vallon’@'localhost’ (using password: YES)
Any ideas?
January 10, 2009 at 10:05 am
Thanks, setup test server on Vista OS make me sick for whole week. Its perfectly work.
January 10, 2009 at 7:06 am
If you cannot see a page.
Within the php.ini file set short_open_tag = On
Allow the <? tag. Otherwise, only <?php and tags are recognized.
NOTE: Using short tags should be avoided when developing applications or
libraries that are meant for redistribution, or deployment on PHP
servers which are not under your control, because short tags may not
be supported on the target server. For portable, redistributable code,
be sure not to use short tags.
January 8, 2009 at 9:16 am
Excellent work! YOU ARE Spot on in the tutorial!!!
January 6, 2009 at 12:02 am
i have no httpd-vhosts.conf file and in httpd.conf there is no line #Include conf/extra/httpd-vhosts.conf
everything was going fine up till that point
help please
December 31, 2008 at 11:40 am
Best Install Tutorial.
Problem on Vista – everything installs fine, phpinfo() works fine, MySQL command line works fine, Apache works fine. I can use mysqli_fetch_row fine but f I try to use mysqli_fetch_assoc I get the Vista Error: Apache HTTP Server has stopped working, when I check the Apache Error Logs I get this line after I try to run the php file that uses mysqli_fetch_assoc
[Wed Dec 31 00:03:27 2008] [notice] Parent: child process exited with status 255 — Restarting.
Any thoughts?
December 30, 2008 at 8:09 pm
Hi Michael
I do not see my SQL when I go to http://www.myserver.dev I can only see Apache and PHP5. The installation was exactly as in the tutorial for the SQL as well as the version.
December 30, 2008 at 10:07 am
hi everyone,
This tutorial is great however i have found a way to install everything on a windows vista operating system with one installation file. The way is to download a wamp server one installation and Apache, PHP5, and mySQL5 are installed on your pc ready for use. it also includes the phpmyadmin and even a mySQL command console.
The download site is: http://www.wampserver.com/en/
this service and download are free for all i know.
After installing make sure to go to phpmyadmin and then privileges and create a user.
December 30, 2008 at 7:26 am
Hi Michael,
This is an excellent tutorial.
December 24, 2008 at 9:42 am
Just a note on Vista and editing the httpd.conf file. I believe this is a problem if it’s installed under ‘c:\Program Files’ I installed it instead in a directory off of c:\ and was able to edit files just fine.
December 23, 2008 at 5:59 am
Hi Michael,
I followed your instructions but when I go to http://www.myserver.dev, it only returns the “It Works!” message. When I restart Apache server I only get the Apache/2.2.11 (Win32) message at the bottom of the window, not the Apache/2.2.11 (Win32) PHP/5.2.6 that is shown in your pictures. Do you have any idea what the problem might be.
thanks
donald
December 22, 2008 at 3:41 pm
I can confirm that when the username “root” is combined with the MySQL account password I can open the PHPMyAdmin page. Thanks Mayan for saving a few more of my diminishing head hairs!
December 22, 2008 at 1:36 am
Followup to the last post:
The problem is I would see the login page but cannot login. However, Firefox provided me more information which was: “Connection Interrupted….The connection to the server was reset while the page was loading…..The network link was interrupted while negotiating a connection. Please try again.”
I hope to hear from you or somebody who may be able to assist. thanks
December 21, 2008 at 4:22 am
Thanks alot for this masterpiece information. I had been unable to do the installation successfully since the past three days until I got to this site from google search.
However, I have a problem similar to the first one mentioned by Mayan (comment #314 — Cannot load mcrypt extension. Please check your PHP configuration. ???? ). Though not withstanding, I was still able to login to mysqladmin. But the problem came when I went to uncomment ;extension=php_mcrypt.dll in php.ini hoping that would remove the alert. subsequently I would see windows box alerting that ‘a problem prevented apache from running….’
I removed the pma folder, undo the change I made to php.ini and repeated step 5 over again but I still could not open mysqladmin login page.
What do I need to do please to fix this bug.
Thanks
December 19, 2008 at 6:55 am
Thanks for the tutorial. Worked first time
One teeny tiny niggle: your niftycube is not so nifty and I get the unresponsive script warning for http://www.visionmasterdesigns.com/blog/wp-content/themes/VMD2/niftycube.js:253 every time I load or reload the page.
Anyway, ’tis the season so Merry Christmas/Yule (or whatever).
December 18, 2008 at 7:59 pm
Hi again,
regarding to my last comment that it doesn’t connect to the phpmyadmin the problem was solved it doesn’t use the password “root”. the user name is “root” and the password will be what was used to create the apache server and mysql.
December 18, 2008 at 1:16 pm
First thing is first, thanks for the best tutorial for installing: apache, php, mysql on windows vista.
I would have loved to leave this comment with nothing but thanks but i 2 lil problems:
1)Cannot load mcrypt extension. Please check your PHP configuration. ???? i get this error on signin page to phpmyadmin. when pointing browser to http://www.myserver.dev/pma/index.php
2) Even when using root as login detail for user name and password it give the following problem: #1045 – Access denied for user ‘root’@'localhost’ (using password: YES).
Please if anyone can explain what i should do to fix this problem because i’m new to php learning it myself so all asistance will be great thanks again.
December 18, 2008 at 12:39 pm
I have a question. I am only interested in STEP 5 phpmyadmin.
If I wanted that only do I have to do all the other steps before step five or can I only do step 5. Because I try to only do the phpmyadmin part and it is not displaying/working?
December 10, 2008 at 9:30 pm
If you run skype, it can stop Apache from working properly. When trying to start Aparche, you will get the following error message:
(OS 10048)Only one usage of each socket address (protocol/network address/
is normally permitted. : make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Either exit Skype before installing or running Apache or in Skype’s advanced option unselect using port 80.
Cheers,
Saeid
December 10, 2008 at 8:25 pm
In Step 1.3 or just before Step 1.4 you should mention that running Apache requires restarting Windows (at least in Windows XP/SP2) otherwise you won’t see the message “It Works” in the browser when typing http://localhost/
Cheers,
Saeid
December 7, 2008 at 10:28 am
Hello Michael!
Following the tutorial, it was easy to understand. However, the phpmyadmin part failed for me. The login part that is. I even tried replacing the config file with the code you gave on page 19 of the comments.
I keep getting the root admin password wrong thing, you know….the #1045 thing.
Any help regarding this would be fine!
December 4, 2008 at 4:33 pm
@organicon
You haven`t pasted the entire code. try once again by pasting this in httpd-vhosts.conf
[code]
DocumentRoot "C:/Server/www/myserver.dev/public_html"
ServerName myserver.dev
ServerAlias http://www.myserver.dev
AllowOverride All
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
[/code]