Breaking News

WAMP - How to install and setup Apache, MySQL and PHP in Windows

This tutorial will walk you every single step of the way through installing and setting up WAMP (Windows, Apache, MySQL & PHP). With WAMP installed, you can run a web server (and things like WordPress, MediaWiki, and Jinzora) on your Windows PC.

  1. To get started, head over to the WAMP download page and save the .exe to your desktop. Once the download has completed, run the installation file. The first message you’ll see is a warning – if you have an older version of WAMP (1.x) installed, make sure to uninstall it first. Otherwise click Yes to continue.

  2. click to enlarge

  3. Click Next on the initial setup screen.

  4. click to enlarge

  5. Review the License Agreement, select I accept the agreement and then click the Next button.

  6. click to enlarge

  7. It’s a good idea to leave the default installation directory alone (C:\wamp\) – but if you want to change it, now’s the time. Click Next to continue.

  8. click to enlarge

  9. Decide if you want to have WAMP Quick Launch and/or Desktop icons, and click Next.

  10. click to enlarge

  11. Finally, click Install.

  12. click to enlarge

  13. The installation doesn’t take too long.

  14. click to enlarge

  15. Once it has completed, the setup phrase will begin. If you have Firefox set as your default browser, WAMP will ask you if that’s the browser you want to use. Click Yes.

  16. click to enlarge

  17. At this point, if you have a software Firewall installed, it will probably pop up and warn you that Apache wants to accept incoming connections. Depending on your specific Firewall the “button” to click may be different, but it will be something similar to Unblock. Do not click “Keep Blocking”.

  18. click to enlarge

  19. Leave the SMTP: server set as localhost (more on this later) but do change the email address to yours. Click Next.

  20. click to enlarge

  21. That’s it – you’re done! Make sure that there’s a check in the Launch WampServer 2 now box, and click Finish.

  22. click to enlarge

  1. In your System Tray you should now see a “WAMP” icon. Click it, and select Put Online (Note: if it says Put Offline ignore this step and skip to the next one).
  2. image: http://www.simplehelp.net/images/wamp/wamp00.png

  3. Open your browser (if it isn’t already) and enter the URL http://localhost.
  4. image: http://www.simplehelp.net/images/wamp/wamp01.png

  5. The WAMP configuration page will load. From here you can access the tools phpMyAdmin, sqlitemanager etc.

  6. click to enlarge

  7. Now you’ll want to set a MySQL password, because by default, WAMP doesn’t set one. Select phpMyAdmin from the WAMP configuration page. At the bottom of the phpMyAdmin screen you’ll see a message about MySQL running without a root password.
  8. image: http://www.simplehelp.net/images/wamp/wamp02.png

  9. To correct this, select the Privileges link. In the User overview section, place a check in the box next to Root – Localhost (see image below) and then click the Edit Privileges button.

    click to enlarge
  10. Scroll down to the Change password section, and enter your password in both boxes. Click Go to save the change.

  11. click to enlarge

  12. Make sure you get a message saying The password for 'root'@'localhost' was changed successfully.
  13. image: http://www.simplehelp.net/images/wamp/wamp05.png

  14. Minimize your browser window, and open up Windows Explorer (or whatever file manager you use in Windows). Navigate to the C:\wamp\apps\phpmyadminx.x.x\ folder. Inside that folder, open up config.inc.php – ideally in an HTML or PHP editor, but Notepad will do if you don’t have an html/php/code editor.

  15. click to enlarge

  16. Search for the line $cfg['blowfish_secret'] = ''; – if you’re using notepad it might be easier to just search for the word blowfish
  17. image: http://www.simplehelp.net/images/wamp/wamp07.png

  18. Change the line $cfg['blowfish_secret'] = ''; to $cfg['blowfish_secret'] = 'mypassphrase'; – where mypassphrase is your own password – not the same one you specified for root in MySQL.
    image: http://www.simplehelp.net/images/wamp/wamp08.png

    Note: as you can see from the screenshots above and below, this is much easier to work with in an HTML/PHP editor than it is in Notepad.

  19. click to enlarge

  20. Now search for the phrase ['auth_type'] = 'config'; (again, if you’re using Notepad you might want to just search for auth_type).
  21. image: http://www.simplehelp.net/images/wamp/wamp09.png

  22. Change config to cookie.
  23. image: http://www.simplehelp.net/images/wamp/wamp10.png

  24. Almost done. Now search for $cfg['Servers'][$i]['password'] = ''; Replace the = ''; with = 'your-mysql-password'; – where your-mysql-password is the MySQL password you specified back in step #6 of this section.

  25. click to enlarge

  26. Save the changes you’ve made and exit out of your editor. Click on the WAMP icon in your System Tray and select Restart All Services.
  27. image: http://www.simplehelp.net/images/wamp/wamp12.png

  28. Bring up your browser again, and refresh http://localhost. Select phpmyadmin again.
  29. image: http://www.simplehelp.net/images/wamp/wamp13.png

  30. This time you’ll be prompted to login. Use root as the Username and enter the password you specified in step #6 as the password. Ignore the error about mcrytp not being loaded – we’ll fix that in a minute.
  31. image: http://www.simplehelp.net/images/wamp/wamp14.png

  32. Return to the Privileges section, and this time place a check next to the user root with the host 127.0.0.1 (see screenshot below) and click the Edit Privileges button.

  33. click to enlarge

  34. Set the password to the same one you used for root previously (step #6) and click Go. Confirm the password was updated.
  35. image: http://www.simplehelp.net/images/wamp/wamp15.png

  36. Now select the user root in the production.mysql.com host section, and once again click the Edit Privileges button.

  37. click to enlarge

  38. Again set the password to the same one you’ve previously used for root.
  39. image: http://www.simplehelp.net/images/wamp/wamp17.png

  40. And make sure it updates successfully.

  41. click to enlarge

  42. Click the WAMP icon in your System Tray, choose PHP from the menu, then PHP extensions, scroll down to php_mcrypt and select it.
  43. image: http://www.simplehelp.net/images/wamp/wamp19.png

  44. Refresh phpMyAdmin in your browser, and this time you’ll be prompted to login, but without the mcrypt error.

  45. click to enlarge

  46. You’ve now set a password for MySQL, making it considerably more secure.

  1. If you’re running Windows XP, 2000 or NT and have an outgoing (SMTP) mail server already installed on your PC, and can be accessed by localhost, you can skip all the steps in this section – your’e done! If you’re using Vista (or don’t have a mail server installed) – keep reading.
  2. Because a number of services you may use require a working mail server, we’ll set up Fake Sendmail and use your ISPs outgoing mail server. An example of a service that requires working mail is WordPress – if you forget your password and want to reset it, WordPress will email it to you. Without Fake Sendmail (or a local SMTP server) every time a service tries to send an email, it will fail.
  3. Head over to http://glob.com.au/sendmail/ and download sendmail.zip. If your ISP requires that you use SSL, make sure to download sendmail-SSL.zip as well. Create the folder(s) C:\usr\lib\ and extract sendmail.zip (and sendmail-SSL.zip if you need it) into that folder.

  4. click to enlarge

  5. Open up sendmail.ini in Notepad. Scroll down to the smtp_server= section and change it to smtp_server=your.smtp.server, where your.smtp.server is your ISPs outgoing mail (SMTP) server. If you’re unsure of your outgoing mail server, you can try this list of ISP mail servers – if yours isn’t listed there, check w/ your ISP. In the smtp_port= section, make sure it’s set to 25 – assuming your ISP uses port 25 for SMTP (not all do – though mine does).

  6. click to enlarge

  7. In the default_domain= section, add your ISPs domain. For example, if you use Comcast as your ISP, add comcast.net. Because I have service from Telus, my default domain is telus.net (as seen in the screenshot below).

  8. click to enlarge

  9. If your SMTP server requires authentication, add your username to the end of the auth_username= field, and your password to the auth_password= field.
    Note: you can use the Gmail SMTP server (see this FAQ for details) – assuming you have a Gmail account. However, during testing I noticed a considerable delay in receiving mail – up to 7 hours. Using my ISPs mail server settings there was no delay at all.

  10. click to enlarge

  11. Save your changes to the file (sendmail.ini) and exit Notepad. Now click the WAMP icon in your System Tray, select PHP and then click php.ini.
  12. image: http://www.simplehelp.net/images/wamp/fsm04.png

  13. Scroll down to the [ mail function ] section. Comment out each of the For Win 32 lines by adding a semicolon ( ; ) in front of each one (see screenshot below). Uncomment the line sendmail_path = by removing the semicolon ( ; ) in front of it. Add "/usr/lib/sendmail.exe -t" to the end of the line, so that it reads: sendmail_path = "/usr/lib/sendmail.exe -t" (again, see the screenshot below).

  14. click to enlarge

  15. Save php.ini and exit out of Notepad (or whatever editor you used to edit php.ini). Click on the WAMP icon in your System Tray and select Restart All Services.
  16. image: http://www.simplehelp.net/images/wamp/fsm07.png

  17. Now any time one of your web services needs to send an email…
  18. image: http://www.simplehelp.net/images/wamp/fsm08.png

  19. it will go through!
  20. image: http://www.simplehelp.net/images/wamp/fsm09.png

  21. That’s it – you’re done! You now have a fully functional Apache, MySQL and PHP system on your PC.

Read more at http://www.simplehelp.net/2008/08/25/how-to-install-and-setup-apache-mysql-and-php-in-windows/#3yPyL4desistOcez.99


Source : http://www.simplehelp.net/2008/08/25/how-to-install-and-setup-apache-mysql-and-php-in-windows/

No comments