Hoe te en opstelling Apache, MySQL en PHP in Vensters te installeren

door Ross McKillop op 25 augustus, 2008

E-mail Het Ontwerp & Dev van het Web Vensters

Dit leerprogramma zal u elke enige stap van de manier door het installeren en vestiging lopen WAMP (Vensters, Apache, MySQL & PHP). Met geïnstalleerdee WAMP, kunt u een Webserver (en dingen zoals WordPress, MediaWiki in werking stellen, en Jinzora) op uw PC van Vensters.

Het installeren van WAMP
Vorm WAMP & MySQL
Installeer en opstelling Valse Sendmail


Het installeren van WAMP

  1. Om over begonnen te worden, hoofd aan Wamp- downloadpagina en bewaar .exe aan uw Desktop. Zodra de download heeft voltooid, stel het installatiedossier in werking. Het eerste bericht u zult zien is een waarschuwing - als u een oudere versie van geïnstalleerdet WAMP (1.x) hebt, zorg ervoor om het eerst te desinstalleren. Anders klik Ja om verder te gaan.

  2. klik om te vergroten

  3. Klik Daarna op het aanvankelijke opstellingsscherm.

  4. klik om te vergroten

  5. Herzie De Overeenkomst van de vergunning, uitgezocht Ik keur de overeenkomst goed en klik dan Daarna knoop.

  6. klik om te vergroten

  7. Het is een goed idee om de standaardinstallatiefolder alleen te verlaten (C:\wamp\) - maar als u het, nu de tijd wilt veranderen. Klik Daarna om verder te gaan.

  8. klik om te vergroten

  9. Beslis als u WAMP wilt hebben Snelle Lancering en/of Desktop de pictogrammen, en klikken Daarna.

  10. klik om te vergroten

  11. Tot slot klik Installeer.

  12. klik om te vergroten

  13. De installatie duurt niet te lang.

  14. klik om te vergroten

  15. Zodra het heeft voltooid, zal de opstellingsuitdrukking beginnen. Als u Firefox hebt die als uw standaardbrowser wordt geplaatst, zal WAMP u vragen of is dat browser u wilt gebruiken. Klik Ja.

  16. klik om te vergroten

  17. Op dit punt, als u een geïnstalleerdem softwareFirewall hebt, zal het zal zal u waarschijnlijk dat opduiken en waarschuwen Apache wil inkomende verbindingen goedkeuren. Afhankelijk van uw specifieke Firewall kan de „knoop“ om te klikken verschillend zijn, maar het zal iets gelijkend op zijn Deblokkeer. niet klik „Levensonderhoud dat“ blokkeert.

  18. klik om te vergroten

  19. Ga weg SMTP: server geplaatst zoals localhost (meer op dit recenter) maar [[do]] verander het e-mailadres in van u. Klik Daarna.

  20. klik om te vergroten

  21. Dat is het - u wordt gedaan! Zorg ervoor dat er een controle in is Lancering WampServer 2 nu de doos, en klikt Eindig.

  22. klik om te vergroten


Vorm WAMP & MySQL

  1. In uw Dienblad van het Systeem zou u een pictogram nu moeten zien „WAMP“. Klik het, en selecteer Zet online (Nota: als het zegt Zet Offline ignore this step and skip to the next one).
  2. Open your browser (if it isn’t already) and enter the URL http://localhost.
  3. The WAMP configuration page will load. From here you can access the tools phpMyAdmin, sqlitemanager etc.

  4. click to enlarge

  5. 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.
  6. 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

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

  8. click to enlarge

  9. Make sure you get a message saying The password for 'root'@'localhost' was changed successfully.
  10. 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.

  11. click to enlarge

  12. Search for the line $cfg['blowfish_secret'] = ''; - if you’re using notepad it might be easier to just search for the word blowfish
  13. 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.

    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.


  14. click to enlarge

  15. Now search for the phrase ['auth_type'] = 'config'; (again, if you’re using Notepad you might want to just search for auth_type).
  16. Change config to cookie.
  17. 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.

  18. click to enlarge

  19. 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.
  20. Bring up your browser again, and refresh http://localhost. Select phpmyadmin again.
  21. 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.
  22. 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.

  23. click to enlarge

  24. Set the password to the same one you used for root previously (step #6) and click Go. Confirm the password was updated.
  25. Now select the user root in the production.mysql.com host section, and once again click the Edit Privileges button.

  26. click to enlarge

  27. Again set the password to the same one you’ve previously used for root.
  28. And make sure it updates successfully.

  29. click to enlarge

  30. Click the WAMP icon in your System Tray, choose PHP from the menu, then PHP extensions, scroll down to php_mcrypt and select it.
  31. Refresh phpMyAdmin in your browser, and this time you’ll be prompted to login, but without the mcrypt error.

  32. click to enlarge

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

Install and setup Fake Sendmail

  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. 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).

  13. click to enlarge

  14. 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.
  15. Now any time one of your web services needs to send an email…
  16. it will go through!
  17. That’s it - you’re done! You now have a fully functional Apache, MySQL and PHP system on your PC.
Related Posts:
  • How to easily install Apache, MySQL and PHP in OS X
  • How to setup Virtual Hosts in Apache
  • How to reset a lost MySQL root password
  • How to install applications on your N95 from a local web server
  • How to install WordPress on your Windows PC
  • Get Simple Help tutorials just like this one in your email inbox every day - for free! Just enter your email address below:

    You can always opt out of this email subscription at any time.


    Bookmark and Share

    { 1 trackback }

    How to install applications on your N95 from a local web server - Simple Help
    10.28.08 at 7:48 pm

    { 14 comments… read them below or add one }

    1 Abraham 08.31.08 at 8:38 am

    This indeed made a great contribution for me as a novice user of the wamp server. Thank you very much

    2 Nathan J. Brauer 09.02.08 at 10:17 pm

    Thank you very much! Out of all the tutorials I found out there, this was by far the best AND easiest! Kudos and Thanks!

    3 chaos 09.05.08 at 11:24 am

    XAMPP is much easier to be honest.

    I’d look into it.

    4 Sanjeev Mishra 09.08.08 at 6:07 am

    Really great help dear!

    Thanks a lot…!!!!!!!!

    5 Felix Oquendo 09.11.08 at 4:51 pm

    Excellent instructions. After I installed WAMP, I’ve issue setting up MySQL password. Tried many suggestions from many sites and though most offered some basic information, none has been so detailed and easy as on this site. Wish I had found this site three weeks ago when I first installed WAMP.

    6 Chuck Jessup 10.10.08 at 7:27 pm

    Chaos i did try XAMPP and it wouldn’st setup correctly and apache and mysql failed to staer because the installer placed them some where and the program couldnt find them… grew tired of 30 minute install and constant failures to start the apache server… tried again to get the wamp server installed and it started fine… oh another point… just so people know i followed the instructions as they are printed, where you put my passphrase, i found that if it was different than the root pw it would lock me out of the phpmyadmin admin off the local host… however when i used the root password and followed the remainder of the instructions it woulded right…

    anywho i dont feel that the xwampp thing really works however i welcome you all to try it…

    Chuck Jessup

    7 Garry 10.14.08 at 6:52 am

    Hi, I followed your instructions to the letter, been having a heck of a time getting PHP5, Apache2 and MySQL to work together. I am having problems still, only now I just get a barrage of error messages saying various DLL files are missing. I didn’t figure I’d have to change any configurations just to get the program to start initially, but apparently something went wrong somewhere.

    8 Nathan J. Brauer 10.28.08 at 3:13 am

    I tried Xamp. Way too many things to take care of for a starter and it isn’t nearly as self-installing as this one.

    9 webripper 11.02.08 at 4:31 am

    Thank you very much! thats the best tutorial i ever seen

    10 upol 12.12.08 at 9:06 am

    the link http://glob.com.au/sendmail link is down. Any other work around?

    11 Thank You BUT!!! 12.13.08 at 11:44 am

    Thank You BUT!!!

    Excellent :0

    but I still get the error:-
    Cannot load mcrypt extension. Please check your PHP configuration.

    Otherwise with a very small sql database it works OK :)

    I think I need to make some changes to allow much bigger sql databases (2Gb would be nice)

    12 Rohit 01.20.09 at 7:56 am

    The BEST tutorial…I recommend this for an Award if there is any out there!! :-)

    13 How about poor Perl? 01.20.09 at 2:40 pm

    How about poor Perl? I found this did not display properly I’ve tried ever shebang in the book. It worked but showed the word>>>print<< instead if displaying what was in the print “hello world\n”;

    14 Stanley Krute 02.02.09 at 2:22 am

    Thanks for the info RE Fake Sendmail.

    It didn’t work for me, however, until further googling revealed that WampServer puts a second php.ini file in c:\wamp\bin\apache\Apache2.*\bin, and that’s the one I had to make the relevant changes to. Making the changes to c:\wamp\bin\php\php5*\php.ini didn’t work.

    Just in case someone else hits the same wall …

    – stan

    Leave a Comment

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>