Slashdot Mirror


PHP Optimized for Windows Server 2008

Stony Stevenson writes "It used to be that popular PHP applications would run more poorly on Windows Server than on a Linux or Unix servers, for which PHP had been optimized. Specialist in the PHP language Zend Technologies now says that's no longer the case. The Zend Core commercially supported form of PHP has been certified by Microsoft as ready to run 'with performance and stability' on Windows Server 2008, said Andi Gutmans, co-founder and CTO of Zend. Previously, PHP 'didn't run as well as it should on Windows,' said Gutmans, despite the fact that 75% to 80% of PHP users were developing on Windows workstations."

21 of 182 comments (clear)

  1. In Short by TheRealMindChild · · Score: 4, Insightful

    So, in short, they aren't using cygwin anymore to compile it.

    --

    "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
  2. FastCGI != Apache Module by Foofoobar · · Score: 4, Informative
    As a CGI you still have to make extra system calls that you don't have to make as an apache module. Running under FastCGI is a good first step but it still doesn't make it as fast as running it as an Apache Module. In a recent post on Slashdot about how Microsoft is learning from open source, they claim they made IIS more modular like Apache but this is not the case as PHP proves otherwise they could run it as a module.

    I applaud the effort to embrace open source languages though and hope they continue along this path of self improvement.

    --
    This is my sig. There are many like it but this one is mine.
    1. Re:FastCGI != Apache Module by arodland · · Score: 4, Informative

      In my testing (Perl, not PHP, but I don't think it particularly matters here), a "real world app" ran 98% as fast under FastCGI as under mod_perl -- and FastCGI is easier to deploy, easier to maintain, and (in the simple case) better on memory. Is it really worth chasing that extra 2%?

      Of course, in the case of PHP, there's an extra incentive. I don't trust PHP's security or sanity for shit. So I'd much rather have it running in its own process with its own permissions than have it dynamically linked directly into my webserver :)

    2. Re:FastCGI != Apache Module by pdxp · · Score: 3, Interesting

      PHP used to also ship as an ISAPI module, but it did pretty much the same thing that the CGI did- reload the interpreter for every single request. I'm not sure why they bothered with FastCGI when it would've required about the same amount of effort to write an ISAPI extension. It might have to do with the fact that PHP's source code was more spaghetti-like than any PHP code one could dream up, and not trivial to follow or modify.

      It would be interesting to compare the performance to that of Python [insert framework name here] on Windows, both the ISAPI version and the FastCGI version.

  3. Misleading by MojoRilla · · Score: 5, Insightful
    This is misleading.

    75% to 80% of PHP users were developing on Windows workstations.
    And how many of these applications are being deployed on Windows? Probably not that many. Windows isn't a great server operating system.
    1. Re:Misleading by Santana · · Score: 4, Informative

      This is misleading.

      Only if you have problems reading English. That sentence clearly speaks about development, not deployment.

      --
      The best way to predict the future is to invent it
    2. Re:Misleading by muszek · · Score: 4, Funny

      Food? Are car analogies not good enough for you?

    3. Re:Misleading by jsebrech · · Score: 4, Insightful

      And how many of these applications are being deployed on Windows?

      My company's PHP based software runs over 95 percent on IIS servers. We have a single customer that uses linux for their web server platform (a university). We're talking about big customers here, like Siemens and ISS (one of the world's largest cleaning firms), with dozens of servers each running our platform, all of them Windows servers.

      We've been deploying PHP on fastcgi the whole time. ISAPI has never been stable, and CGI has always been too slow.

      Tthe situation changes for non-intranet web apps. Those tend to be linux-hosted because people tend to outsource their hosting. But for in-house hosted software, most of the time you have to fall back on the existing network team, who is usually specialized in windows, so they tend to prefer windows-based web servers, even if it's just for the sake of uniformity.

  4. Nothing to do with optimization by dedazo · · Score: 5, Interesting

    PHP on IIS5/6 had to run as a CGI application, because their ISAPI handler implementation was historically crappy and unstable under load. CGI under the thread-oriented (as opposed to process-oriented in *nix) pipelining model of Windows was usually not a good performer. IIS7 introduced FastCGI, which is what Zend used to "certify" PHP to run on Server 2008. But FastCGI is not an optimization, it's a new execution mode for IIS. Nor was PHP modified (AFAIK) in any way to run effectively on FastCGI. Python apps also run very well on it (which personally is more exciting to me than PHP).

    --
    Web2.0: I love when people Flickr my cuil and digg my boingboing until my google is reddit and I start to yahoo
  5. Re:Optimise your spell check by oxidiser · · Score: 5, Informative

    It's a British spelling. Like my handle (Oxidiser) or Aluminium.

  6. Comment removed by account_deleted · · Score: 4, Insightful

    Comment removed based on user account deletion

  7. Re:Marketing by Constantine+XVI · · Score: 3, Insightful

    Sounds like IIS 7 (in '08) has something called FastCGI which they used to get the better performance.

    --
    "I think an etch-a-sketch with an ethernet port would beat IE7 in web standards compliance."
  8. PHP on Windows by corychristison · · Score: 4, Insightful

    ... like Ruby on Rails?

    Just kidding. Seriously, though, it said "commercially supported form of PHP". Be sure to take a big mental note of that.
    Commercial == fee's. Based on Zends track record of charging for things, it's not going to be cheap for single developers... I have a feeling it'll be in the area of $800-$1500 per CPU or something silly like that... in which case, why not just use a UNIX/derivative?

  9. Why not Apache? by edmicman · · Score: 5, Insightful

    We run a .NET shop here, but even I wonder, why not just install Apache on Windows? Errrrr, or why not just go the easy route and put up an Ubuntu LAMP server? Everything I work on is in Windows, but I just don't see the benefit of running PHP on Windows...what does [Microsoft say] the Windows platform offers for PHP that running it on freely available platforms doesn't?

    1. Re:Why not Apache? by RipSUp · · Score: 5, Funny

      They don't want your LAMP to become a WAMP, they want it to become a WIMP (Windows/IIS/MSSQL/PHP)

    2. Re:Why not Apache? by jjrockman · · Score: 4, Funny

      Don't you mean Windows IIS MySQL PHP/Perl? Or, WIMP for short.

      --
      Quit jabbering on the phone while driving. You are not that important.
    3. Re:Why not Apache? by jfbilodeau · · Score: 3, Interesting

      Agreed.

      In 2004-05, I wrote a PHP application for a client. We had agreed ahead of time that the app would be written in PHP. Upon delivery, everything worked great on the test (WIMP) server that I set up myself. When the technician was called in to put the application in production, he said no problem. I should point out that the fellow is a hard-core and experienced MCSE.

      A month later, the application was not installed. I called the technician to find out what was happening, and I was given the story of being too busy. I offered to do it myself, but they would not agree to that. The tech promised to install it ASAP.

      A week later, still nothing. Called again. After I pressed the technician as to why he would not install it, the answer he gave we what that 'installing foreign application like Apache & PHP may destabilize the server ecosystem.' According to him, it should have been written in ASP(.Net).

      What a wonderful Microsoft-ish answer. He finally agreed to install PHP after I pointed out that PHP CAN run on IIS.

      The FUD and BS that MS crams down their MCP just makes my blood boil. Disclaimer: I _was_ a MCP and MCT, so I know the type of stuff Microsoft feeds.

      The appplication works. It still being used today by dozens of offices across Canada (coast-to-coast). And as far as I know, the maintenance has been near 0.

      Most of my applications are LAMP, and the maintenance time/cost has been near 0.

      --
      Goodbye Slashdot. You've changed.
  10. If you have to contact sales to find out the price by symbolset · · Score: 4, Informative

    Then the answer is: "More than it's worth."

    --
    Help stamp out iliturcy.
  11. Re:Optimise your spell check by FyRE666 · · Score: 4, Funny

    President Bush? Is that you?

  12. Optimized double misery by 200_success · · Score: 3, Funny

    PHP and Windows? They each suck enough on their own.

  13. Re:another prese by PHPfanboy · · Score: 3, Informative

    Zend is the PHP Company. I don't think it's any great secret that their aim is to monetize PHP. I'm not sure there's anything inherently wrong with that. Plenty of other companies and individuals monetize PHP by providing software, consulting, hosting and other services around PHP If there's value-add provided, companies will pay.

    You're probably perfectly aware that there are a large section of Linux using shops who are perfectly happy to pay, hence the success of RHEL and to a lesser extent SuSE and now Ubuntu all of which offer support around free stuff.

    The fact that Zend has worked with IBM on PHP for i5 (AS400) and with Microsoft for decent PHP on Windows only increases the choice of platforms PHP developers have to deploy on, makes PHP projects more popular across other user bases and means that PHP developers have a wider range of employment opportunities available to them. I don't think anyone is under the illusion that the future of PHP development is at 6 person consultancies who specialize in tweaking free CMSs, surviving on that free good stuff and creating pure karma (with no disrespect to small web consultancies intended, but it's a limited niche to attract new active members to the community).

    If you'd like to spend your time pitching PHP as a strategic application development option to Fortune 500 companies, government departments and other enterprises, I'm sure we'd all be delighted, but there's not much chance of you spending your time doing that, nor quite frankly of those entities listening to you. They do however talk to Zend.

    Zend isn't imposing a cost/tax on anybody or demanding that people pay homage/tribute, especially as PHP is a community project and not owned by Zend. During the past 2 years Zend has increased the amount of free and open source work they've done (Zend Framework and the Eclipse-based PDT) so it's not like they take and don't give.

    If there is value companies can get from Zend's solution set, then they will pay for it. And they do. It's simple cost-benefit equations. WRT your "siphoning off revenue" if you look at all the companies in the Open Source space (including MySQL, EZ Publish, Acquia and other) they all provide value adds.

    And yeah, I work for Zend. And no, you don't have to buy our stuff (but at least come check it out). And no the decision to monetize PHP wasn't made by executives on the fringe of the FOSS world, but rather technology people in the middle of it. (I have no idea whether they have hair up their asses like you claim - but can gladly inform you that that's not a sound basis for a business strategy unless you're a barber looking for a niche....)

    --
    29 mpg. YMMV.