We have developed a PHP application, currently running very fine on a LAMP server configuration.

One of our customers asked us whether it would be possible to port it to a Windows machine. Why? Customer satisfaction... Fact is they have a long running partnership for their IT environment with a vendor of Microsoft products and they simply can't afford to invest in Linux support!

What is the best, I mean most stable and fastest solution?

It is very very easy to install a stable MySql, Apache as a Windows service and make PHP work on any Windows machine. But what about IIS? There's enough information to succesfully install PHP in conjunction with IIS, but will performance be better or worse than PHP-Apache-Windows?

Has anybody got any experience with this?
Thanks a lot!!

    Although I have never tried PHP on IIS (I use Apache) but I've heard that some people have problems with slowness and compatability. There is however a .msi package that installes PHP on IIS. I've never used it so I can't say how well it works. I would recommend Apache over IIS any day. You could search the Web for PHP Apache vs IIS. I did a quick search and here are a few links you might want to check out. Let me know how it goes.
    http://php.weblogs.com/Apache_IIS
    http://www.phpbuilder.com/columns/jayesh20021029.php3
    http://www.phpbuilder.com/board/showthread.php?s=&threadid=10234240

      I'm running PHP under IIS for development, works like a charm. Everything i write also works on Linux & Apache, so you don't have to worry about that too much. Even file managers and stuff like that.

      I run the isapi module and don't have problems at all. It's fast and stable, crashed only a few times in the last 2 years (because of some reall bad looping).

      I don't have a pc running on Apache myself at the moment, so i can't tell you for 100% that its as fast as running it on Apache. But i don't think it's slow at all, it's the opposite.

      This is how i set it up (i've used these settings on serveral pc's with IIS):

      -> run -> inetmgr
      // To run PHP on 1 website only
      -> open "Defauilt Web Site" (if you haven't renamed it)
      // To run PHP on multiple sites that IIS hosts
      -> openwebsites (second open after openening Internet Information Services at the left)
      -> properties
      -> ISAPI filers
      -> Add
      -> Filtername PHP, Executable (locate php4isapi.dll)
      -> Then to Home Directory
      -> Configuration
      -> Add
      -> Executable: php4isapi.dll
      -> Extension, whatever you'd like to use, .php, .phhtml, etc
      -> properties -> documents, there you can set the default documents, index.php perhaps?

      Restart IIS or restart win and it should be working. Make sure your php.ini settings are correct, i needed different values for some options on different pc's. I haven't got a clue why :S

      i hope its usefull, good luck

        We use both Apache and IIS in Windows environments at work. They both work just fine installed with the zip. My personal preference is Apache, it seems to be a little quicker and it is much more stable. Our IIS systems sometimes chuck out memory errors on ASP scripts that work fine 98% of the time, which requires the entire system to be rebooted because the fatal error seems to reside in IIS (this problem seems to have been at least partially cured with a recent Windows update). Our systems running Apache have never had any web applications take them down.

          You probably won't see much of a difference between the two, as far as performance and stability are concerned, unless you get a LOT of traffic... that's when it becomes apparent how much better Apache is. I used to use IIS way back in the day (around 2000-2001), and it worked Ok until I started to get a lot of traffic. I was running some ASP scripts, and was just learning PHP so I had a few very small insignificant scripts running too. When the site started to see a lot of traffic it started to slow way down and I'd get strange ASP errors occassionally (on scripts that work most of the time). That's when I dumped ASP and IIS altogether and completely switched to PHP and Apache. Haven't looked back since. I've never had Apache crash, or get strange errors on scripts (other than user induced ones 😉 ).

          Besides, IIS is a pain to administrate. There's a fairly steep learning curve involved with Apache, but once you get used to editing text files you'll find GUI's to be a waste of time.

          My vote is for Apache all the way.

            We run Apache, MySQL, and php on a windows server for testing stuff before putting up on our Linux live accounts. Since much of the web is now powered by Linux (and cheaper host options) this seems to be a good solution for us.

            We run IIS in the office and it appears slower than our Apache configuration :dunno:

              Write a Reply...