Set up your AMFPHP environment: running IIS and Apache simultaniously

AMFPHP Add comments

This post will guide you through the steps that are needed to setup your computer as a webserver in order to run PHP. After all, without running PHP, you won’t be able to use AMFPHP since it is the language it is written in.

The tools needed are:
– an operating system (Windows in my case)
– a webserver (IIS or Apache for instance)
– PHP (duh!)
– a database system (MySql, probably the most used with PHP)

The setup I use is also called a WAMP setup. WAMP stands for Windows, Apache, MySql and PHP. Note that a LAMP setup (Linux, Apache, MySql and PHP) is probably more used, but WAMP just better suits my needs.

You can start downloading all of the above mentioned tools and then spend a couple of hours (if this is your first time) installing and configuring them untill it drives you nuts and it still doesn’t work. Or, you can download WampServer and let the dirty work be done for you. Get WAMPServer here.

The installation

I tried to make as much screenshots as possible that show all the different steps, so this installation should be peanuts for you.

1. Wamp installation welcome screen (screenshot)
2. License agreement (screenshot)
3. Where should WAMP be installed? I left this at the default location. (screenshot)
4. Start menu folder. (screenshot)
5. Start WAMP on startup? Whatever you like best. I checked it because I needed to work with it for the coming 2 weeks and just to make sure everything was running. (screenshot)
6. Settings overview before installation. (screenshot)
7. Select your webroot folder (screenshot). This is the default but I prefer not to have any workfiles on the same drive as my Operating System in case I needed to format. Therefor I change the location to my D-drive. (screenshot)
8. Warning because I changed the webroot folder. You might not get this screen when you stick to the default location. (screenshot)
9. Select you default browser. Click OK to use Internet Explorer (screenshot), or browse to the FireFox executable. (screenshot)
10. Setup done. Let’s launch WAMPServer. (screenshot)

After the installation

11. If everything went alright, you should see a new icon in your systemtray. This indicates that WAMP is or is not running and provides some menu options. (screenshot)
12. Test it. Click the tray menu and choose the “localhost” option or open up your browser and point it to http://locahost. You should see a file overview of the files in your webroot. This folder may be blank if you chose another folder than the default webroot folder. (screenshot) If you did choose the default webroot folder you should see the WAMP startscreen. (screenshot)
13. In case you didn’t see the WAMP startscreen, copy the files in the default webroot location to the folder you chose as a webroot. (screenshot)
14. Click the PHPMyAdmin link under Tools on the WAMP startscreen to check if MySql is running. (screenshot) PHPMyAdmin is a webinterface to control your MySql databases.

Where’s my IIS startscreen on http://localhost?

IIS users (who run ASP for instance) probably noticed that http://localhost normally pointed to the startscreen of IIS. So how can I access my ASP and PHP webapplications on localhost? Simple, you can’t. At least not when you are running WAMP without having modified the configuration.

15. Shut down WAMPServer. (screenshot)
16. Point your browser to http://localhost. You should see the IIS startscreen, at least when you are running IIS on your computer. (screenshot)

OK, so do I have to shutdown WAMPServer if I want to work on an ASP application and start it again to work on a PHP application? The answer is no! Fortunately there is a way to run both webservers at the same time. All you need to do is change the port number the webserver is running on.

Port number?

When you type in http://localhost in your browser, it is interpreted as http://localhost:80 by the browser because port 80 is the default http port. A port is just an indication to the computer to start a specific process. By default, on my system, it runs IIS. We will leave port 80 as it is and change WAMP to run on port 81.

17. Click the WAMP systemtray icon and choose “httpd.conf” under “Config files”.
18. Do a search for “port 80″ in the config file. (screenshot)
19. Change it to “port 81″. (screenshot)
20. Restart WAMPServer. (screenshot)
21. Click the “Localhost” option in the WAMP systemtray menu.
22. FireFox opens but you get a security warning. It is trying to open the IIS startscreen. (screenshot) Internet Explorer will show the startscreen without the warning as shown before. The point of this step is to notice that the port 81 we specified in the config isn’t shown in the browser’s url bar. We need to change the links on the menu options in the WAMPServer systemtray menu.
23. Open the “wampserver.ini” file in the WAMP installation directory. (screenshot)
24. Scroll down to the “Menu.left” settings. (screenshot)
25. Notice that the parameters show http://localhost and not http://localhost:81.
26. Change the settings to point to port 81. (screenshot) You need to do this 3 times. Once for the “localhost” menuitem, once for the “phpMyAdmin” menuitem and once for the “SQLiteManager” menuitem.
27. Exit WAMPServer. (screenshot) Make sure you completely shut down the tool!
28. Start WAMPServer. (screenshot)
29. Click the “localhost” option in the WAMPServer systemtray menu. It should point to http://localhost:81. (screenshot)
30. Open another browser window (Internet Explorer) and point it to http://localhost or http://localhost:80. The IIS startscreen should open. (screenshot)

Now both the IIS and the Apache webserver are running simultaneously. Once this is done, you can start installing and configuring AMFPHP.

Add to Bloglines - Digg This! - - Stumble It! - Twit This! - Technorati links - Share on Facebook - Feedburner

35 Responses to “Set up your AMFPHP environment: running IIS and Apache simultaniously”

  1. Tom Vandenbossche Says:

    Net uw instructies gevolgd en ik geloof dat dit fantasisch zou werken, alleen als ik mij phpMyAdmin opendoe vindt hij het pad naar zijn images, testDB nie meer.
    .ini file is aangepast etc… dus weet nie goe aan wat dit zou kunnen liggen.
    Als ik de properties van een bepaald beeld opvraag verwijt hij wel nog altijd naar de localhost ipv de localhost:81
    Heb je dit ook ondervonden of weet je waaraan dit zou kunnen liggen?

    Iemand ook ervaring met de koppeling van dynDNS? Mijn IIS is nu ingesteld met dynDNS maar wat met Apache…



  2. Christophe Says:

    Dag Tom,

    verander in je phpMyAdmin in het bestand de volgende regel:
    $cfg['PmaAbsoluteUri'] = ‘localhost:81/phpmyadmin/’;


  3. mike Says:

    that’s great…. my noly question is, has anyone (or you maybe) possibly created LAMPServer?.. or a version of this application to run on OS X??.. Or could you point me in a direction where i could find a nice step by step guide to set uplike this?…

    thanks in advance


  4. Bryan Clover Says:

    Dude! This article was VERY helpful! Thanks a bunch! Any hint as to when you’ll have the similar AMFPHP installation tutorial posted?

  5. Reddy Says:

    Amazing article helped me a lot. Thank you

  6. Nico Says:

    With best compliment for this article.
    soon as possible i will install it and test AMFPHP

  7. Krs Says:

    Hi! This is truly great help for the first timers like me. Thank you so much. Please let me know when you post AMFPHP installation tutorial.
    Thanks again

  8. Jose Mendoza Says:

    Thnx for the article, great,help me alot

  9. Luis Says:

    Thank you for your tutorial. I can run wamp and IIS on Server 2K3 x64.

  10. niladri Says:

    Thanks. Now I can run both IIS & Apache

  11. Apinya Says:

    Thank a millions for your help.

  12. DH Says:

    Thanks for this. Came in handy.

    In the wampserver.ini, there’s actually about 5 references which need to be changed. A find and replace for http://localhost/ to http://localhost:port_number/ is probably the easiest way to ensure you catch all of them.

  13. Sunday Says:

    I install wamp on my home pc to test my CMS but when type Http://localhost the error i got ist that server is not found. the same error message is given when i type http://localhost/phpmyadmin. Please can you help and advise on what i should do?


  14. William Says:

    Hi Christophe,

    I am using AMFPHP 1.2.5. After I moved the files to production server, the browser page doesn’t have any content except “Exploring MyService.php”. (Please see the photo for reference.)

    I have traced the code. It seems like it stopped at “$this->_classConstruct = new $this->_classname(NULL, NULL, NULL, NULL, NULL, NULL, NULL);” at line 203 of ServiceBrowser.php. May I know how to fix it? Thanks.

  15. Knight Says:

    Zeer duidelijke uitleg !

    Ik heb WAMP en binnen 5 minuten werkte alles op port 81 !

    Top gedaan

  16. Ramakrishna Says:

    Thank you for giving solution

  17. Major Says:

    Hey! Thanks for the article but after installing Wamp on Vista home edition all I see in when i try to view localhost is blank page. Whats happening????

  18. b.rotrou Says:

    great sample.
    i’m trying to use amfphp and sql server, and I have some bug , do you have use this two technologies together?

    the broswer of amfphp see the data base ans their enter but dont give me their value.

  19. Wilfried Redant Says:

    I came accross this article and am actually looking for an IIS expert as our current Windows 2003 server in combination with PHP/MySql is too slow and we also have issues with Flash that we don’t have on Unix servers.

  20. asipo Says:

    nice tutorial, its really helpdul to me

  21. Marco Conti Says:

    Nice article. But I am using Wampserver 2.0 and the name of the config file now seems to be: wampmanager.ini .
    After making the changes (and I tried to change the labels as well BTW) something rewrite the .ini file with the regular localhost path. I can see that by editing it in notepad++ and after I restart WAMP I get a notice to reload the page with changes made outside the program. Luckily, I can just create a bookmark for it and it still works fine, but it’s annoying.

  22. waitASec Says:

    That’s kewl about the server setup but, umm, where does this go into AMFPHP? Ugh, google these days will pick up anything.

  23. Eric-Jan Says:

    Beste Christophe Herreman,

    Een heel heldere uitleg, dank u.
    Maar mijn WAMP tray is geel na installatie. Als ik het icoon aanklik, zie ik alle onderdelen behalve Config files en dus geen httpd.conf. Dat is al vraamd, ligt dat aan de versie?
    Dan maar geprobeerd met zoeken in de WAMP directory: daar krijg ik wel 2 httpd.conf files (welke is de juiste?) Echter daarin vind ik geen port 80. Wel een Listen 80…
    Ik heb WampServer2.0d.exe geinstalleerd (want WampServer2.0e.exe gaf een fout bij installeren).
    Verder draait er ook een sql server database op de server. Kan dat nog conflicteren?

    Ik hoop dat u me kunt helpen.
    Bij voorbaat dank.
    Eric-Jan van Gorkum

  24. Nzinga Says:

    Thanks a lot. It was a very useful article, keep up with the good work

  25. Joe Says:

    This instruction was very helpful! Thank you!!

  26. sandeep Says:

    sir , superb explanation really appreciate effort , I am very much tensed due to non functoining of my wamp server due IIS server

  27. Lean Ray Says:

    Thank you for this tutorial. This will really help me in finishing our thesis.

  28. James Radford Says:

    thanks for this article. First time using WAMP although Im working on an ASP.NET project as well. Can have both, IIS and Apache running now :)
    Thanks again,

  29. Sreenath H B Says:


    I was just following your tutorial after installing WAMPServer 2.

    There seems to be an update: There is actually no ‘wampserver.ini’ file anymore but a ‘wampmanager.ini’ in the installation direcory.

    As you mentioned, the http://localhost entries were present in this file and I updated the same. But after restarting the wampmanager, the localhost was still pointing to port 80. I opened the ‘wampmanager.ini’ and saw that the values had been reverted to http://localhost again.

    After searching around in other files, I found my solution here:

    There is a ‘wampmanager.tpl’ file in the same folder as ‘wampmanager.ini’ which is a PHP script which rebuilds the ‘wampmanager.ini’ each time the wampmanager starts. So I searched for the http://localhost entries in this file, found them and updated them and I got my desired result.

    Yoo Hoo. Finally succeeded after hours of toil and a mysqld.exe crashing error. I am an ASP.NET guy and I am totally not used to so much manual configuration!

    Thanks for a great detailed article.


  30. Stefanny Tamrac Says:

    Admin, Can you suggest some help. I downloaded wamp to my windows 7 but it will not work. I also tried easyphp and problem was the same.

    Kindly suggest some help.

  31. Zahid Mahmood Says:

    great Job. It really help allot.
    Thanks !!!!

  32. Mark Starkey Says:

    i had the same issue with wamp on windows 7, you need to run it as an administrator. this can be acheived by locating wampserver in the start menu right mouse click and click properties, then goto compatability and tick ‘run this program as an administrator’ click ok and then start wampserver.

    If it still doesn’t run properly make sure nothing else is using port80, skype was my issue and you can alter this by doing the following: open skye and goto Tools > options > Advanced > Connection and untick use port 80 and 443.

    this is generally the issue for most installations

  33. Marco Murillo Says:

    Hello, I’ve been trying this amf tech, but … I’ll try to resume my problem:
    I link to: http://localhost/amfphp/gateway.php and everything is ok up to this point. When I click on the link to load the service browser … nothing happens, I mean nothing, blank screen. Any ideas anyone?.

  34. Jen Says:

    Thanks for the tutorial yours was the best I have read yet. Since there is a new version of WAMP2, the wampserver.ini file is not there and has changed. This presents a problem for those of us not so educated in working with these files.
    I tired to follow Sreenath’s suggestion above but the files I needed to change
    are not clear.
    What I did was go to the wampmanager.tpl file I found 3 http://localhost scripts and updated them to http://localhost:81 for the following scripts
    Mysqllite and Mylocalhost were not umong the scripts available to me in the wampmanager.tpl file. I get a blank page when I try to bring up my WAMP
    localhost. Can someone tell me what I did wrong?

  35. pravin Says:

    Thanks lol….
    Below mentioned url is very easy to understand,

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in