Beginners Guide: Install PHP 5, MySQL 5 on Apache 2.2 on Windows (with screenshots!)

September 10, 2007 – 11:38 am

This guide is intended for beginners who wanted to install PHP 5 and MySQL Community version 5 and make it work with Apache 2.2 . Installation will be done locally, so that you can test web application such as Wordpress before going live. This is quite a long guide so prepare yourselves for a ride!

 

install-php-5-mysql-5-on-apache-2.2-windows

 

Prerequisites : You had already installed Apache 2.2 locally on Windows. If not, please read my previous Apache 2 installation guide and come back later to continue with this post.

 

 

Install PHP 5 on Windows

1- Download the latest Windows PHP Binaries (MSI file) from this page. I choose the eZNetworking mirror because it is the closest one to Malaysia. Choose a mirror that is nearer to your country for a faster file download. The latest PHP version that I downloaded is 5.2.4. Save the file to your Desktop.

php5-installer-file-download

 

2- Right click on the file and click “Install“.

 

3- Click “Next ” once the Welcome page is displayed.

welcome to php setup wizard to start

 

4- Select “I accept the license agreement” and click “Next “.

accept-php-license-agreement-to-install

 

5- Change your PHP installation path OR just accept the default path - C:\Program Files\PHP\ and click “Next “.

enter-default-path-to-install-php-5

 

6- On the Web Server Setup screen, select the Apache 2.2.x Module and click “Next “.

select-webserver-to-install-php-on-apache-2

 

7-On the Apache Configuration Directory screen, browse for the Apache configuration directory (conf) OR just enter C:\Program Files\Apache Software Foundation\Apache2.2\conf\ and click “Next ” to proceed with the installation.

select-apache-webserver-configuration-directory

 

8- For now, accept the default selection and click “Next”.

accept-default-php-5-components-to-install

 

9-Click “Install ” to install PHP 5 on Windows.

click-install-to-setup-php5-on-apache2

 

10- Click “Finish ” once completed. PHP 5 is successfully installed.

click-finish-to-finalize-php-5-installation

 

11- Start your Apache 2.2 server using the “Monitor Apache Servers” console (Start -> Apache HTTP Servers 2.2.4 -> Monitor Apache Servers ). You can see that PHP was successfully installed by checking the Apache status at the bottom of the console.

check-apache2-monitor-to-find-php-5-installed

 

 

Test your PHP 5 Installation

1- Open up your Windows Notepad. Type in “<?php phpinfo(); ?>” inside the file. Save this file as “info.php” inside your Apache root directory, C:\Program Files\Apache Software Foundation\Apache2.2\htdocs .

php-info-to-test-php-configuration

info-php-file-on-apache-root-directory

 

2- Open up your web browser. In the address bar, type in your web server domain name plus info.php as the file name. Example: http://www.syahid.com/info.php . You should get a PHP configuration page just like the one below.

php-configuration-page

 

Congratulations! You have successfully installed and test PHP 5 on Windows!

 

Tell Apache 2.2.x to Support PHP Index File

What happens if you change your index.html (default web server homepage) to index.php and try to access your homepage? Apache will not recognize it and you won’t see anything displayed on the page. To make sure Apache recognizes index.php as a default homepage too, follow the instructions below.

 

1- Rename your index.html to index1.html and info.php to index.php (for testing purposes only!).

change-apache-config-to-support-index

 

2- Edit your Apache configuration file, C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf by opening it with Windows Notepad.

 

3- Find a line that starts with “DirectoryIndex index.html…“. Add index.php at the end of the line . Save the file and restart your Apache Server from the “Monitor Apache Servers” console.

add-index

 

4- Load your Internet browser again. Type in your web server address e.g http://www.syahid.com. You should get a page similar to the info.php page above. Index.php now is recognized as a default Apache homepage, just like your normal index.html page.

 

 

Install MySQL 5.0 Community Edition on Windows

1- Download MySQL 5.0 Community Edition to your Desktop from here. If you want to download from a different mirror, click here. Make sure you always download the “Complete package “. Current version during this post was written is 5.0.45.

 

2- Unzip mysql-5.0.45-win32.zip (the downloaded mysql file) to get Setup.exe. Double click Setup.exe to start installing MySQL. Click “Next ” when you are prompted as below.

welcome-to-mysql-community-5-setup

 

3- Select “Typical” for Setup Type and click “Next ” again.

select-mysql-typical-installation-type

 

4- Click “Install ” to proceed with the installation process.

click-install-button-to-install-mysql-5

 

5- The setup activity will show you some advertisement. Read it if you wish and click “Next “.

read-or-ignore-mysql-promotion

 

6- Tick “Configure the MySQL Server now” and click “Next ” two times.

configure-the-mysql-version-5-now

welcome-message-to-mysql-configuration-wizard

 

7- Click “Standard Configuration” to ease installation process and click “Next ” again.

select-standard-mysql-configuration

 

8- Tick “Install As Windows Service” to make MySQL auto-startup with Windows and “Include Bin Directory in Windows PATH ” to make MySQL system files automatically available for other application.

install-mysql-as-windows-service-and-add-to-PATH

 

9- Tick “Modify Security Settings” and enter a root (Administrator) password to secure your MySQL installation. Don’t skip this step! Click “Next ” again.

enter-root-password-for-mysql-administration-account

 

10- Click “Execute” to start the MySQL Configuration process. Once finished, click “Finish ” to end configuration.

click-execute-to-configure-mysql-5

click-finish-to-finalize-mysql-version-5-installation

 

11- Make sure MySQL runs automatically after installation. You can check the status from Administrative Tools Services snap in (Start -> Programs -> Administrative Tools -> Services ), also available via Control Panel.

check-mysql-running-from-services-administrative-tool

 

12- (OPTIONAL) Open your DOS command prompt (Run -> cud). Type in “net stat -na“. Check out ports opened by MySQL (3306) and Apache (80) . That means the services are up and running.

check-mysql-running-with-ports-cmd-command

 

13- (OPTIONAL) Run some of MySQL commands to further ensure that the installation is a success. Check out and follow the commands as pictured below. User account is root and password depends on what you have entered previously during your MySQL configuration.

test-to-access-the-mysql-database

 

14- IMPORTANT: Reboot your machine! This is to ensure all MySQL system files are rss-read by Windows as environment variables.

 

Configure PHP 5 to Work with MySQL with MySQL PHP Extension

Previously, we have installed PHP with minimal modules / extension. To add MySQL support to PHP, you need to change your PHP installation - by adding the MySQL extension on top of your PHP installation. Please make sure that your original PHP 5 MSI installer still remains at its original place .

 

1- Open the Add / Remove Programs console via Windows Control Panel. Find the PHP 5.x.x entry and click “Change “.

change-php-configurations-to-enable-mysql-extension

 

2- Click “Next ” once you are prompted the Welcome page.

change-php-configuration-welcome-page

 

3- Click the “Change ” button to proceed.

click-change-button-to-edit-php-5-configuration

 

4- Select Apache 2.2.x as shown in the picture below. Click “Next ” once again.

select-apache-2

 

5- Select your Apache configuration directory (conf) - the directory where your httpd.conf resides. Click “Next ” once done.

choose-apache-configuration-directory

choose-apache-configuration-directory-2

 

6- On the “Choose items to install” screen, click on the plus (+) icon next to Extensions to expand the list.

click-plus-button-to-expand-extensions-part

select-extensions-page-on-expandable-part

 

7- Select on the “X” next to “MySQL” and select “Entire feature will be installed on local hard drive”. Click “Next” again.

select-mysql-extension-to-install

 

8- Click the “Change” button to save all the PHP configuration changes.

click-change-button-to-install-php-extensions

 

9- Finally, restart your Apache 2.2 web server! You can check out that the MySQL extension support for PHP was successfully installed by checking out the info.php / index.php page that was created before.

mysql-extension-successfully-installed-for-apache-2

 

Congratulations! Give yourself a pat on the back to finally manage it here. Now you can run almost many web applications that depends on Apache 2.2, PHP 5 with MySQL 5 database support. If any of those app complain about any missing extensions, remember that you can always reconfigure PHP by following the steps above.

 

Whew! This is quite a long guide but I really hope that someone out there will benefit from it!

Tags: , , , , , , , ,

You come again! Maybe it is the right time to subscribe to my RSS feed. Thanks for the support!

Related Posts:


  1. 190 Responses to “Beginners Guide: Install PHP 5, MySQL 5 on Apache 2.2 on Windows (with screenshots!)”

  2. I am very thankful to you. This technique is really very good.

    By Bhaskar Rabha on Sep 19, 2007

  3. glad you like it bhaskar. you can share it with other if you find it useful.

    By TechMalaya on Sep 19, 2007

  4. WOW!!! Thanks after spending hours and hours of trying to install all 3 of these programs I finally decided to look up a tutorial, and this was it, THANKS!!!

    By Brody on Sep 20, 2007

  5. very pleased that this tutorial managed to help you. :D

    By TechMalaya on Sep 20, 2007

  6. simply useful… thanks!

    By jojo on Sep 22, 2007

  7. I only wrote the content. you make it useful by following it. :D

    By TechMalaya on Sep 22, 2007

  8. Thanks for dropping by my blog :DThis tut is long, I recommend my tut unless you want to boost your techie ego: install wordpress locally

    By TechZilo on Sep 22, 2007

  9. hehehe. some like it long. some like it short. just a matter of options. but remember, xampp is more suitable for testing, not production use.

    By TechMalaya on Sep 22, 2007

  10. man, after wasting 4 hrs, your pages helped me a lot. thanks a lot. Cagatay

    By cagatay on Sep 23, 2007

  11. glad that i could help!

    By TechMalaya on Sep 23, 2007

  12. I followed the instructions to install Apache with PHP. It works, but when I change the location of the DocumentRoot in httpd.conf and the Directory to match it, the PHP stops working in the browser, although it seems to be running Ok the the Apache Service Monitor.

    By Tuyre on Sep 24, 2007

  13. If you change the DocumentRoot and Directory to C:\Root for example, make sure you have already created the new Root directory itself, and don’t forget to copy / create a new index.php inside your new DocumentRoot folder. I tried it and there was no problem at all.

    By TechMalaya on Sep 24, 2007

  14. I have a problem. Everything is fine but I insert data to form and click submit it doesn’t show anything:
    {{

    Name:
    Age:

    }}
    second page:

    {{
    “;
    print “You are “. $Age . ” years old”;
    print “”;
    $old = 25 + $Age;
    print “In 25 years you will be ” . $old . ” years old”;
    ?>
    }}

    By Suuri on Sep 25, 2007

  15. sorry man. can’t help you. i am not a programming guy. better off to devshed or some progger forum.

    By TechMalaya on Sep 25, 2007

  16. Thank you so much for your tutorial! Got me out of a tight bind! Was using a book i bought, but discovered it was advising based on completely outdated versions which were impossible to even find, and the instructions weren’t totally relevant to new versions. Yours was perfect! Thanks again!

    One question though, I do get the MySql data on the phpinfo test, but i tried another one using really basic stuff;

    and it came up not connecting. anything obvious wrong?

    Thanks again!

    By Paul on Oct 14, 2007

  17. The code didn’t seem to show up, this is it again anyway;

    (no space)

    By Paul on Oct 14, 2007

  18. $connection = mysql_connect( “www.horan.com”, “root”, ” ” )
    or die( “Sorry - unable to connect to MySql”);
    echo( “Congratulations - You have connected to MySQL!” );

    By Paul on Oct 14, 2007

  19. maybe you should give full access to the IP of the PC that you are connecting from.

    By TechMalaya on Oct 19, 2007

  20. This great….thanksss

    By Andrie on Nov 9, 2007

  21. 10x for the guide it`s realy helpful.
    i could`t solve that problem for week.

    By Ivaylo on Nov 19, 2007

  22. @ Ivaylo: Thanks! Glad this is beneficial to you.

    By Syahid Ali on Nov 19, 2007

  23. Dude this is a greate tutorial , Just like a lot of people out there , iwould like to thank you . Though Ihad installed everything , there were some small configurations that was needed . Thanks to You i can get my Job done .

    May god bless you.

    By Siddharth on Nov 26, 2007

  24. Hi,

    Thankyou very much for helping me by giving clear information regarding installation procedure for PHP & Apache.

    Regards,
    Prasad

    By Durga Prasad on Dec 6, 2007

  25. Thank for the clear explanation and a updated guide!

    By john smith on Jan 14, 2008

  26. @john smith: Hope it is useful to you!

    By Syahid Ali on Jan 14, 2008

  27. Phew! After trying several times and searching everywhere find out how to install Apache, PHP5 and MySQL, I finally came across this tutorial.

    I followed your precise instructions and they all installed the first time of trying, thank you very much for taking your time and effort to explain.

    The instructions here are far better and clearer than the programmes own development site.

    By Alan on Feb 4, 2008

  28. @Alan: Glad you love it Alan. The feeling is great when somebody find this kind of “long post” useful. :D

    By Syahid A. on Feb 4, 2008

  29. Fantastic guide - thanks so much for it! Best one on the net!

    By Tanner on Feb 5, 2008

  30. Thanks! Your tutorial is the only one that got MySQL to work for me!

    By Zac on Feb 5, 2008

  31. @Tanner, @Zac: Thanks for the compliments!

    By Syahid A. on Feb 5, 2008

  32. Dear Friend,
    I am trying to install PHP MySQL since 15 days but unable to install. At last I find your tutorial and atarted installing. Every thing is fine put I am not able to connect MySQL since pass word not matching. Please help me. Really I appreciate your very good tutorials.

    By Sadiq Ali on Feb 16, 2008

  33. @Sadiq: I suppose that you can’t remember your MySQL password just after installation eh? Caps Lock on your keyboard maybe? Still not working? Try this instructions to reset root password - http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

    By Syahid A. on Feb 16, 2008

  34. Dear Syahid,
    First of all, please accept my sincere thanks for your tutorial for beginners. Its really appreciable work. but i got stuck with mySQL installation at the end ie., setting password. am being warned “Error Nr.2003 Can’t connect to MySQL server on localhost(10061)”! I tried somany times by re-installing. Ooops!! no use. will you please help why it so happening? is the password what we use at the time of logging in to windows? if so, i set that password only!! hope you help me!!!

    Thanks in advance!

    By Error Nr.2003 Can't connect to MySQL server on localhost(10061) on Mar 1, 2008

  35. @Error: If you reinstall, make sure you remove all the files and folders of the previous MySQL installation. And make sure you remember and enter your initial MySQL root password correctly (for root) - (step 9 - mysql installation)

    By Syahid A. on Mar 1, 2008

  36. Hello.
    Thank you for this tutorial. It did help me but I stuck at one point.

    I installed Apache 2.28 followed by PHP 5.2.5 and followed your tutorial for testing the installation.
    I could get the webserver running.
    I followed the Test your PHP 5 Installation section in this tutorial but I could not get the PHP configuration page on my browser.

    What could be the problem?

    Thanks.

    By Lope Ben on Mar 4, 2008

  37. @Lope Ben: Did you get a blank page or 404? If you get a blank page, make sure you type the correct php test code as mentioned on step 1 of the PHP installation. If you get a 404, you are putting the test file on the wrong folder. Try to restart the Apache service too.

    By Syahid A. on Mar 4, 2008

  38. Thanks Syahid A.

    I got a blank page, and i did type the correct code correctly. But i was able to resolve it anyhow lately, by changing the foward slashes (/) of the directory paths that are auto generated by the apache config file to backslash(\) which is used normally in windows.

    thanks

    By Lope Ben on Mar 6, 2008

  39. I have done all the above and I am using http://:88/info.php

    I have configured apache on 88. Apache is working fine I have tested it. But php is not working.

    Can someone suggest what could be missing?

    Thanks!

    By shashi on Mar 7, 2008

  40. @shashi: Do check out the error log and report it here.

    By Syahid A. on Mar 7, 2008

  41. Hi,
    TQ for the incredibly helpful guide. I have successfully installed Apache 2.2.8, PHP 5.2.4 and MySQL on my desktop yesterday. It is working indeed. TQ!

    But today, when I try to install them on my laptop, i got 404 error when i want to test php on my local server. I’ve checked the code and the path.. a few times, and i think there’s nothing wrong there. PHP appreared on Apache monitor console, but phpinfo is not displayed. Is there anything wrong with my laptop then? My desktop is a DELL on dual core processor and my laptop is an ACER on AMD Turion.

    By enesus on Mar 10, 2008

  42. @enesus: Should not be a problem. It is not related to processor, etc.. Check out if you are putting the php test file on the right htdocs directory. Do check out the error logs too.

    By Syahid A. on Mar 10, 2008

  43. Wow, this is a great help! Am in the design stage for php and mysql features and this info is going to make it much much easier. Thanks for your wonderful information!

    By Ellen on Mar 12, 2008

  44. @kevin: Glad you sort that out! :D @Ellen: You are welcome!

    By Syahid A. on Mar 12, 2008

  45. hi , First please accept my bigggg thanks for such a wonderful tutorial for beginners on apache installation ,php and mysql. I have done everything right but as mentioned in step 9 of “Configure PHP 5 to Work with MySQL with MySQL PHP Extension” i do not get MySQL page when I type in http:localhost/index.php…instead i get the php index page.please help

    By srikanth on Mar 13, 2008

  46. Dear Syahid,

    Today i tapped my back after installing Appachi, PHP and MySql by sincerely following your instructions. Really yar your tutorial is excellent. I am not a computer wizard I learned computers only by reading by books and sincerely following the advices of people like you. Keep it up Syahid, really people like you are very helpful to make the people to learn computers. I was fedup with other tutorials but your stuff is really good. Now I request you to tap your back because you made a lay man to install PHP, Apache and Mysql.
    Thank you once again.

    By Sadiq Ali on Mar 14, 2008

  47. I have done everything according to your NICE tutorial but I cant get “MySQL” section showing up running the info.php (pt. 9).

    Same problem as srikanth (Mar 13, 2008) I belive.

    Thank you in advance!

    By Gnevi on Mar 14, 2008

  48. @Gnevi: Did you get past the index.html part? And make sure that you type the right php code. Don’t miss anything.

    By Syahid A. on Mar 14, 2008

  49. Many many thanks - you’ve started me on the road to building my site.

    I had tried to do this before from a well known book which gives you several screenshots of steps where the only available option is to click ‘next’, but only gives advice such as ‘enter all pertinent network information’ when you really need help! Your guide by comparison is very thorough and well-written.

    Thanks again

    By Matt Sim on Mar 19, 2008

  50. Fantastic tutorial!! From M’sia? Me too!! Haha… I’ve been suffering for months because my WinXP Home Edition doesn’t have IIS and it’s difficult to test .asp file locally. Moreover, my MS Access seems to hate me, didn’t work properly. So is kind of giving up on MS and now trying hard to switch everything to PHP, Apache and MySQL… Really thanks for your tutorial, can’t find better tutorial than this on the net. Good job!!

    By Chai on Mar 21, 2008

  51. @Matt Sim, @Chai : Thanks for the kind words!

    By Syahid A. on Mar 23, 2008

  52. @Gnevi

    libmysql.dll already comes with PHP. You just need to set the path in environment variables for windows xp.

    1. Click start > Control Panel > System
    2. Click the Advanced tab > Environment Variables
    3. Under System Variables, highlight PATH then click edit.
    4. Add ‘;C:\Program Files\PHP’ (assuming you used the default installation.

    By Poldo on Mar 25, 2008

  53. hi… thanks a lot for a detailed tut… It really helped me a lot when i was cornered!! Thanks dude ;)

    By Ujjwala on Mar 27, 2008

  54. This was amazing. I was trying to get this to work for some time now quite unsuccessfully, but thanks to your guide i did it in 30 mins.
    Thanks a lot!

    By buzz on Apr 5, 2008

  55. where do I load this file

    mysql-5.0.45-win32

    in which folder

    By Siva on Apr 10, 2008

  56. @Siva: Anywhere that you wish e.g a temp folder, as long as you get the setup.exe

    By Syahid A. on Apr 10, 2008

  57. Hi
    I wish i can express my feelings for your help because i had been trying to setup A.P.M ennviournment almost from one month you got a very great technic and explained welled now i have every thing to learn PHP Thanks alot
    Allah/God give me you more knowledge and you will get every success
    bye

    By Syed on Apr 15, 2008

  58. @Syed: You are welcome Syed! Glad I could help out.

    By Syahid A. on Apr 15, 2008

  59. how do the apache 2.2 work on Local Area Network with an DHCP connection through Linksys Router

    By Jun on Apr 16, 2008

  60. thanks

    By Jun on Apr 16, 2008

  61. @Jun: You need to some port forwarding work on your router. You can get a hint on how to do it here

    By Syahid A. on Apr 16, 2008

  62. Step 10, Finishing the MySQL installation fails. The following message is returned: 1045 Access denied for user root@localhost.

    By Patrick on Apr 18, 2008

  63. “”"”
    Find a line that starts with “DirectoryIndex index.html…“. Add index.php at the end of the line . Save the file and restart your Apache Server from the “Monitor Apache Servers” console…

    Load your Internet browser again. Type in your web server address e.g http://www.syahid.com. You should get a page similar to the info.php page above. Index.php now is recognized as a default Apache homepage, just like your normal index.html page.
    “”"

    ive done that but the page didnt change, still the index.html page is loaded with the “it works” text not the info.php

    what should i do?

    By Sama on Apr 20, 2008

  64. @Sama: Try to delete your browser’s cache and restart the Apache server again.

    By Syahid A. on Apr 21, 2008

  65. worked, pretty thanks

    By Sama on Apr 21, 2008

  66. Hello,

    Perfect guide to install all three important server side applications. I had no problem installing all three.

    Thanks a lot
    Mallikarjuna Kenchappagoudra

    By Malliikarjuna Kenchappagoudra on Apr 21, 2008

  67. just a final question, after renaming index.html to index1.html and info.php to index.php
    do we get the changes off by the end or what?

    By Sama on Apr 21, 2008

  68. @Sama: I don’t quite understand what you mean about “off the end” but the changes are permanent until you changed it back. You can only have one index file working at one time.

    By Syahid A. on Apr 22, 2008

  69. Syahid,

    Well everything went perfectly.

    However I did have to back track a little. Let me explain… When enabling extensions I took the liberty to enable a few extra extensions that I needed and some I thought I wanted.

    When I restarted I received a blank page. So I backed out the extensions that I didn’t need kept only what I needed and everything was back to perfect.

    The moral here folks, follow the guide as directed and you’ll have no problems.

    Make one change at a time, test, confirm then go on to the next change. If it fails then you know exactly what caused it and back it out.

    Thanks again Syahid.

    By Joe on Apr 24, 2008

  70. @Joe: Yeah, it is really a good idea to make a change at one time and see if it works.

    By Syahid A. on Apr 25, 2008

  71. Fantastic guide. I wish all those guys/programmers had half the brain you do. Well done!

    By Margaret on Apr 27, 2008

  72. @Margaret: Best compliment I’ve had this month. :D

    By Syahid A. on Apr 27, 2008

  73. wow thanks so much!

    By chiqui on Apr 30, 2008

  74. Hi
    I have installed Apache 2.2, PHP 5 with MySQL 5 database following your tutorial and its work properly, thanks a lot, excellent tutorial.

    But I have an problem with my free downloaded PHP web applications with mySQl backend from openburhan.com (2004), it doesn’t work, it cannot access the mySQl data. What do I have wrong and what should I do? Please help. Thank You in advance.

    By bamby on May 3, 2008

  75. @bamby: I suggest you try to install another simple MySQL related apps first. For example, WebCalendar. Then only that you will know that if MySQL or the openburhan app is the culprit. Best of luck.

    By Syahid A. on May 3, 2008

  76. Dude! This post was incredible! It saved my life… really! I am now able to install ‘Joomla!?’ without having to use those, really use but insecure, applications like XAMPP and other WAMPs (Windows + Apache + MySQL + PHP).

    Thanks a lot!
    CHeers.

    By Victor Westmann on May 4, 2008

  77. this is totally awesome.

    By obinna henry on May 6, 2008

  78. great guide! thanks.
    got everything installed and running.
    just one question:
    where can i find this information?
    MySQL username, password, and database name?

    By lee on May 8, 2008

  79. @lee: If you did follow the guide correctly, username is root, password is what you have entered, database (default) are mysql and test. You can create your own too. Check out the MySQL manual on how to do that or use applications such as PhpMyAdmin.

    By Syahid A. on May 8, 2008

  80. Thanks a lot!
    This really helped :)

    By South African dude on May 15, 2008

  81. I had checked many tutorials. but yours guide is really working wonders…!!!

    Thankz,

    By ITsingh on May 16, 2008

  82. @ITsingh: Cool! Hope you can share it with others.

    By Syahid A. on May 16, 2008

  83. it is gud to install.even small boy will do install by following ur recommended steps.bye

    By praven on May 28, 2008

  84. This was a very helpful tutorial. Thank you so much for writing it!

    By Rachel on May 29, 2008

  85. Thanks alot for taking the time. It is very straight forward and helps cut through the confusion I’ve read on other websites.

    By John on Jun 4, 2008

  86. @John: Thanks to you too for using this! Spread it! :D

    By Syahid A. on Jun 4, 2008

  87. Thank you for making this sane for me :)

    By SH on Jun 4, 2008

  88. Thank you man !!

    By Alessandro on Jun 6, 2008

  89. Thank you so much for taking the time to explain the processes properly! After deciding to join my husbands web design business I need to learn php, mysql and apache…… got stuck very quick and that was just installing them all! so fingers crossed!

    There is just one thing at the end of changing the mysql settings in php5 my index.php does not look like yours? :-( any ideas?

    By kim on Jun 18, 2008

  90. @kim: How different was your index.php from mine?

    By Syahid A. on Jun 19, 2008

  91. When loaded into the browser (firefox) it showed the php information page and yours shows the Mysql info page. You also just put in http://www.syahid.com with no/index.php When i just put in my www address with no /index.php it just comes up with the IT WORKS page.Everything else works just fine :-) which is a surprise for me! hehe

    By kim on Jun 19, 2008

  92. @kim: As long as you get a page, you are okay! Lol! Normally you don’t have to type index.php because it is a standard file that Apache recognizes. Good luck Kim!

    By Syahid A. on Jun 19, 2008

  93. LOL thank you! my appologies for being such a dohnut! :-) good luck? I think i will need it! Cheers :-)

    By kim on Jun 19, 2008

  94. I followed the instructions on my personal machine and did great. However, when I loaded everything on my server, everything worked until I tried to go into a mysql (3.23.49)database.

    I’d sure love to get this problem fixed.

    By papabill on Jun 29, 2008

  95. @papabill: Should work if both of them are on the same server. If they are not, you need to allow the Apache server IP at the MySQL server.

    By Syahid A. on Jun 29, 2008

  96. Just discovered that mysql v3.23.49 was still on my personal machine. I installed v5.0.45 and now it does not work. Personal machine and server (separate machines) both have latest mysql, and mysql doesn’t work on either one.

    By papabill on Jun 29, 2008

  97. @papabill: Recommended that you backup all MySQL data, uninstall both MySQL, move old folders to new one, reinstall the version that I’ve used and import the data back again. Then, you might try the latest version to see if it works with this tutorial.

    By Syahid A. on Jun 30, 2008

  98. After uninstalling and re-installing everything about 5 times, I finally copied the ENTIRE mysql directory from my personal machine (the one that worked) to the server (the one I couldn’t get to work) and now they BOTH work well.

    By papabill on Jul 1, 2008

  99. @kim + @papabill: Congratulations!

    By Syahid A. on Jul 1, 2008

  100. Hey I need serious help.. I´ve been trying to connect mysql to php but I can’t. I’ve done like you said it still doesnt work.. on the info.php I can see that apache (2.2.8) and php (2.5.6) works… and I have a password and my hostname is root and Mysql works I don’t know that much how to use it though but seems fun..

    How do I connect mysql with php??

    /T

    By TJ on Jul 2, 2008

  101. It’s like this in my path and phrc
    PATH C:\php;C:\Programmer\MySQL\MySQL Server 5.0\bin
    PHRC C:\php\

    By TJ on Jul 2, 2008

  102. @TJ: Can’t understand really what is your problem man. And i don’t think you follow my guide well. I’ve never used something like PHRC / PHPRC etc.

    By Syahid A. on Jul 3, 2008

  103. Hi Syahid I know you didn’t but I thought if you maybe thought something was worng there..
    I still can’t get mysql on the info.php..

    By TJ on Jul 3, 2008

  104. @TJ: Probably you don’t include the MySQL extension during your PHP setup. That’s one of the most common cause.

    By Syahid A. on Jul 3, 2008

  105. Thanks!. It is a great help. I have tried many other sites for help. It did not work well. This is awsome.

    By Thomas on Jul 8, 2008

  106. thanks. it worked for me. it shows the mysql section in the phpinfo(). But i am unable to connect to the database. maybe there is err in the programming

    By Thomas on Jul 9, 2008

  107. Thanks so much for providing a simple, easy to follow guide to installing PHP 5. I was up and running quickly.

    By Claire on Jul 10, 2008

  108. Dear Syahid,

    Your help has been fantastic on the installation of the above items. I am probebly not alone in this question, but have you done any other tutorials?

    Thanks

    By kim on Jul 15, 2008

  109. Excellent work.
    Really helpful.

    By Ashok Sharma on Jul 24, 2008

  110. Thanks, been trying to get PHP and MySQL to talk for awhile! Guess the installer is still a little buggy!

    By Chris on Aug 3, 2008

  111. Wow, someone actually wrote a tutorial that is easy to follow and that works. Good tutorial, well done.

    By Darren on Aug 7, 2008

  112. what a great guide. Worked perfectly and was very easy to follow. Well done my friend.

    By frank on Aug 8, 2008

  113. iv got to the info.php but when i put the adress in with the info.php it comes up as (not found on server) any help ?

    By the mouse on Aug 18, 2008

  114. @the mouse: restart your apache and clear your web browser’s cache. retry.

    By Syahid A. on Aug 21, 2008

  115. Have installed everything. Couldn’t get PHP to connect to the MySQL server. Have tried both with a local MySQL server and a remote installation. Then I discovered in the apache error.log:
    PHP Warning: PHP Startup: Unable to load dynamic library ‘C:\\Program Files\\PHP\\ext\\php_mysql.dll’ - The specified module could not be found.\r\n in Unknown on line 0.

    It appears that PHP isn’t loading the module. The file is definitely there. It loads all the other modules, just not the MySQL.

    By BuroDestruct on Sep 2, 2008

  116. @BuroDestruct: I think you might miss the getting MySQL and PHP to work part. Check out that one again. It seems like your PHP is not installed with the PHP-MySQL module.

    By Syahid A. on Sep 2, 2008

  117. @bambi
    I actually have the same problem. I can’t get the mySQL data with the openburhan site download to load. Had any luck so far? Shahid please could you see if the following site (download here: http://www.openburhan.net/installob.zip) works for you.

    By Likwid on Sep 8, 2008

  118. @Likwid: The culprit must be the app name. Maybe it is not compatible with this version of MySQL. If you can get it work with other app, this app needs some serious maintenance to work again.

    By Syahid A. on Sep 8, 2008

  119. Thank you so much. That really helps.

    By indu on Sep 18, 2008

  120. Thx everything worked fine and it was quite simple compared to other tutorials

    By Golda on Sep 25, 2008

  121. mysql is not functioning, because the windows services is failling. Can u make any suggestions. I am running windows XP.

    By rudy on Oct 13, 2008

  122. @rudy: Make sure there is no other application (or other MySQL services) using the same MySQL port.

    By Syahid A. on Oct 13, 2008

  123. i have a problem after following all the steps ,finally i am stuck with an ERROR !!
    [--------------Error trying access httpd.conf file.You will need to manually cvonfigure the web server-------].how shud i go with it!! please reply

    By deepu on Oct 16, 2008

  124. @deepu: I suggest that you do a reinstall after cleaning all the previous installation files and folders.

    By Syahid A. on Oct 17, 2008

  125. thanks a lot syahid .it worked!!

    By deepu on Oct 17, 2008

  126. Thank you so much i have been trying to insall this lot for ages, i have tryed loads of tutorials and all rubbish, this one was so easy, thank you again and again

    By Justin on Oct 18, 2008

  127. Thankyou very much for this guide. Very clear, accurate and straight to the point.

    And it worked !

    What more could you possibly ask for ?

    Thankyou for taking the time (and thanks in advance for the other articles on your site Im now going to read).

    By ColinS on Oct 30, 2008

  128. Hi, I am stuck at …cannot load php5apache2_2.dll into server: The specified module cannot be found.

    Any suggestions? TIA

    By Chi on Nov 10, 2008

  129. I hope you follow this guide using the SAME apache version as mine. I doubt that you will have any problem if you follow it closely. :D

    By Syahid A. on Nov 11, 2008

  130. Thanks a lot! It was great :) Couldn’t find anything better than this installation guide.

    By irem on Nov 16, 2008

  131. Once again, you got it man. Another beginner thanks you for your great guide. Please do not stop doing things like this- that helps lots of people like me.

    By Roland on Nov 18, 2008

  132. Thanks a Ton….It was very clear steps on installation provided…I thank you again for your great support.

    By rockinghoney on Nov 21, 2008

  133. thanks alot man for this tutorial
    took me 2 days lurking and googling and trying to install those 3 perfectly before i find this great guide

    u really helped alot
    THNX :D

    By buster on Nov 28, 2008

  134. Your guide was awesome! I was able to update Apache server to the latest version, install PHP and MYSQL seamlessly due to your explicit instructions. My eyes glazed over after reading Apache’s website…found yours…it was a lifesaver. THANK YOU!

    By Doreen on Nov 28, 2008

  135. Ho, I personally want to thank you for your guide as well, you answered a lot of questions that I have been racking my brain for the last 4 months…. You need to write a book mate, there is no books out there that cover this…

    Regards marc

    By marc on Dec 7, 2008

  136. Thanks! I found this guide halfway through installing Apache 2.2, PHP 5, and MySQL. I had installed the PHP module’s MySQL extension before installing MySQL, so I didn’t follow the sequence of your guide exactly, but advice on installing MySQL was MUCH appreciated and everything seems to be working.

    By andre on Dec 15, 2008

  137. Dear All,
    I have managed to installed both apache and php well and it works fine. The problem my pc in preinstalled with mysql 5.0.67. So my problem I just cant connect to mysql can anyone help me on this please.

    By newbie on Dec 21, 2008

  138. @newbie: Recommended that you do a new MySQL installation as guided.

    By Syahid A. on Dec 22, 2008

  139. thanks!! this is the best and simple way to show how install php.thanks alot good luck.!!!

    By mehdi on Dec 22, 2008

  140. Nice guide, but to some of the beginners that have stated other guides havent worked for them, is to consider they were just as nice at time of posting. The slightest version change in any of these apps can cause issues. So my suggestion for this and any other guide is to use the exact same versions for their install as the guide itself uses and then after its up and running fine, back up and use the upgrade packages. If all fine you have latest version if not roll back to working version. After some learning time with working version you may be able to do a clean install of the latest versions yourself. Also when adding apps you wish to use such as CMS’ like joomla or phpbb bullentin boards, make sure to check if they work with your installed verisons. (eg. joomla 5 will work with Php 4 but if you use Php 5 you need joomla 6)

    Also to the comments about the MySql how do I connect to it now. A few things to keep in mind are 1)Its a database server for the web apps you run so not much by you really needs to be dun with it. Some of the apps will create the db’s for it after you provide login info during install. 2)If you really need to get into it to make a db to install apps there tools for that - MySql website itself has MySql GUI Tools and Admin tools to download to access right from your system or you can use phpMyAdmin a web served interface, but this one has no installer and requires some config modification to get up and running but is still a great app for the db interface.

    By PcJedi240 on Jan 5, 2009

  141. Aslam o Alaykum,
    Thanks for so detailed article/guide on installation of Apache,PHP and MySQL.
    I successfully installed the Apache & PHP,but when i am trying to get PHP configuration page by typing the web server domain in the browser, there is nothing.
    Also Apache was running successfuly but now it is not starting.

    I am waiting for the solution…

    Regards,
    Saif

    By Saifchi on Jan 16, 2009

  142. @Saifchi: Try restarting all your servers again. There are some guys that had encounter this problem previously. Do read the comments above. :D

    By Syahid A. on Jan 19, 2009

  143. Thank you very much, perfect tutorial for beginners.

    By Alex on Jan 25, 2009

  144. i downloaded this installer
    “php-5.2.8-win32-installer.msi” but while installing on my pc i am getting following error. i selected “IIS ISAPI Module” as web server setup. and on my machine windows XP and IIS V5.1 is installled. can you please tell me why am i getting this error and how can i re-solve this

    By surendra kumar on Jan 29, 2009

  145. there is a problem with this installer package. a script required for this install to compelete could not be run.

    By surendra kumar on Jan 29, 2009

  146. @surendra: I guess the package that you’ve downloaded is damaged then. Try downloading again.

    By Syahid A. on Jan 30, 2009

  147. thank you very much my dear. it has given a wonderful guidance to me.
    once again thank u very much.

    By hari krishna polu on Feb 7, 2009

  148. i am very new to the tech world so please excuse all naive comments/questions. your help is greatly appreciated! i have downloaded apache 2.2 and everytime i try to install php i get the following error message before installation is completed-
    [————–Error trying access httpd.conf file.You will need to manually cvonfigure the web server——-].
    what is your suggestion from this point?
    thank you for any advice!

    By sam gavan on Feb 10, 2009

  149. i have another question for you wizards. i want to start a niche social website that has huge potential. what social network open source script would you recommend? i want to be able to manipulate it as much as possible but at the same time not have to start totally from scratch. thanks for any suggestions.

    By sam gavan on Feb 10, 2009

  150. Thanks for all your tries to make a difficult installation for all of us, to an easy one.
    Thank you again

    @sam gavan:
    Go to the link at the top of the page “Apache 2 installation guide” to reinstall (remove and after install again the apache) because in any other case you can t choose the “apache 2.2.x Module” for the php installation.. That s the problem.

    By Argy13 greece on Feb 14, 2009

  151. That is a great step by step tutorial. Rhanks for writing such a detailed guide.

    By Sohail on Feb 14, 2009

  152. That is a great step by step tutorial. Thanks for writing such a detailed guide.

    By Sohail on Feb 14, 2009

  153. I followed the instructions on this guide, but the MySql extension does not work. But if I run php from a command prompt window, the information about MySql is shown (php “C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\info.php”).Do you have any idea on how to solve this?

    By Ricardo Giles on Feb 14, 2009

  154. I followed the instructions on this guide, but the MySql extension does not work. But if I run php from a command prompt window, the information about MySql is shown (php “C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\info.php”).Do you have any idea on how to solve this?

    By Ricardo Giles on Feb 14, 2009

  155. @Ricardo: I think this problem has been solved sometimes above. Search and look for “info.php”.

    By Syahid A. on Feb 14, 2009

  156. I reinstalled everything and now is working. I realized that I skipped step 14 from MySQL installation. I’m not sure if this caused the problem, but now is working.

    Thakks a lot

    By Ricardo Giles on Feb 14, 2009

  157. Thnx for step by step information.
    It worked…

    By Patil on Feb 22, 2009

  158. thax a lot.its very help full.
    jay

    By jay on Feb 26, 2009

  159. Took me a while to get it all together, but thanks to you it works. This is by far the best guide for WAMP that I have found online, many thanks!

    By Shane on Feb 28, 2009

  160. Very useful post… thanks a lot for all your effort and time explaining it so well.

    By lil77 on Mar 4, 2009

  161. My thanks goes to you for the concise instructions. I have spent two days trying to get this done and I was able to achieve my goal in less then an hour because of you.

    Genius, Absolute Genius.

    By Zoranthous on Mar 8, 2009

  162. Like just all of your comments-thank you for a great understandable tutorial.
    I had one issue, I did the apache install-everything worked. I did the php install- everything worked. I got to the point in the mysql install after I clicked finish and the next screen “Welcome to MYSQL Server Instance” and my install doesn’t show that screen so I am unable to continue with the install. If you have any ideas what is going wrong your help would be appreciated.

    By AJ on Mar 9, 2009

  163. @AJ: Try uninstalling MySQL, reboot, and reinstall again with other applications closed. Should be no problem there.

    By Syahid A. on Mar 9, 2009

  164. Thanks so much, this guide helps a lot. I can start my development now.

    By V on Mar 9, 2009

  165. Thank you very much for this guide.Sorry
    ,I have the same problem as enesus but can not solve it.I can not do the test PHP, reported to me error HTTP 404 - File not found. I am verified the path and it is a correct C: \ Program Files \ Apache Software Foundation \ Apache2.2 \ htdocs.If you can help me solve this?thanks

    By mirsad on Mar 13, 2009

  166. Hey guys..
    the above configuration is very well..
    actually i tried to connect mysql from the last 1 month…
    but i unable to connect…
    but now it’s working…
    really gr8
    i am thanking that guy whose post the wizard..

    ofcourse i am learning php myself…

    By lakshman on Mar 22, 2009

  167. Can u please tell me about MySql5, PHP5.2 and Apache 2.2 that.

    how to make a database through PHP pages ?

    regards,

    By sandeep on Apr 13, 2009

  168. @sandeep: Create a database with PhpMyAdmin. Check out my tutorial on how to do it.

    By Syahid A. on Apr 14, 2009

  169. I have spent more than 8 hours trying to install Apache 2.2, PHP 5 and mySQL 5, solving error after error.
    Your guide helped me so much!!

    A few comments on Vista in order to have the system running, I had to:
    - stop Kaspersky (and add the port 3306 in the list)
    - add the port 3306 in the windows firewall
    - create a batch file for starting the msi (Apache, PHP & mySQL) so that I was able to start the msi with administrator rights (even with that I had to finish the mySQl config du to access errors)

    It works!!!! Thanks a million.

    By Dominique on Apr 16, 2009

  170. Thank you so much for this guide. I have been long trying to find a something reliable and then i found this!! The installations of apache and php were successful, but i’m having problems with the info.php file. After creating it and placing it in the htdocs folder, my webbrowser does not display the page shown above. Please advise as to what could be the problem?

    By Tkhan on Apr 22, 2009

  171. @John: Check the comments above. There are people experiencing the same thing.

    By Syahid A. on Apr 24, 2009

  172. THANK YOU! I´ve only searched about a million tuts to get my mysql to work on my local server, and finally it does! :)

    By Anton Amlinger on Apr 25, 2009

  173. very helpful note.. took me a long time to fix the 500 server error. Then found out that MySQL extension was not include..

    By T on Apr 26, 2009

  174. This is a great tutorial, thanks.

    It is much easier though to just get the pre-built XAMPP from http://www.apachefriends.org where they have a Apache/MySQL/PHP/Perl setup all built and ready for Windows. You can have an whole server up and working in about 20 minutes with the download. Check out what is built into the one package.

    The distribution for Windows 98, NT, 2000, 2003, XP and Vista. This version contains: Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, Ming, JpGraph, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql.

    FYI, I don’t work with AF, I just have liked using their packages.

    By Mike Byers on Apr 30, 2009

  175. Thank you for posting such an easy to understand blog on how to properly get these three applications working. I went through 2-3 other websites that made it way too complicated.

    Much thanks!

    Matthew

    By Matthew on May 14, 2009

  176. This Really Helped Me Out .. Tnx a lot :D

    By SaLmAnAh on Jun 1, 2009

  177. Thanks. Finally I found a real good help.

    By Felisberto on Jun 19, 2009

  178. Thank u very much for this information.I was unable to connect PHP and Mysql before seeing this site.Waiting for more tips.

    By diya on Jul 10, 2009

  179. Hi! I just wanted to thank you so much for your tutorial. Yours was the only one that explained how to get MySQL to work with PHP - I tried tons of books and websites, but until yours, mysql was just not showing up in phpinfo. Many, many thanks!

    By Jennifer on Jul 28, 2009

  180. Thanks for helping me set up APACHE + PHP5 + MYSQL. It was easy thanks to this useful guide.

    By SRF on Aug 25, 2009

  181. Simply WOW. After visiting 100s of sites on the internet, I ran across this tut and could finally setup php with mysql. What a relief!

    Thanks a lot. May God bless you.

    By YK Prakash on Aug 30, 2009

  182. U are gr8. This is the best article of net on this subject .

    Thanx

    By Ranjeet Singh on Sep 5, 2009

  183. tnx

    By rose on Sep 8, 2009

  184. hi this code help me very much thanks

    By Bagesh Singh on Oct 22, 2009

  185. Thx a lot is all I can say - people like you make the internet a miracle :-)

    By Kim, Denmark on Nov 14, 2009

  186. This is the best tutorial I’ve found on this subject. If only all tutorials on the web could be like this!

    By Steve Robertson on Jan 13, 2010

  187. very helpful article. THANK YOU!

    By Ram on Jan 20, 2010

  1. 4 Trackback(s)

  2. Jan 29, 2008: Enable Printable View on Any Website with Aardvark Firefox Add-On
  3. Feb 10, 2008: Janapriya.net » Blog Archive » Installing WSF/PHP in Windows using the binary package.
  4. Aug 7, 2008: Installing WSF/PHP Binary in Windows (WAMP) at SOA, Governance and Web Services
  5. Dec 1, 2008: gcfrench: Installation

Post a Comment

Clicky Web Analytics