Jump to content

PHP on a windows server


simpgm25

Recommended Posts

We have a W2K web server running IIS 5.0. We are looking into scripting languages to pull information from a database and display them to a website. I like what I have read about PHP and mysql. I was informed by an individual that PHP should not be run on a windows server but on a Linux server. Is this true? If so, what are the drawbacks? I don't see anything in the PHP manul to supprt this.
Simeon
Link to comment
Share on other sites

PHP can be run on a Windows server. However, if given a choice, I would most definitely run it on a *nix based server instead.

1. Make sure PHP is not running in CGI mode but, as an Apache module. Less overhead...better execution.
2. And this is just from personal experience running both....Windows servers suck when it comes to PHP.
3. I find Linux much more flexible.
Link to comment
Share on other sites

[quote author=simpgm25 link=topic=118503.msg484267#msg484267 date=1166040802]
I appreciate the reply. Can you give me more info on why it sucks on a windows server. Thanks
Simeon
[/quote]

Wow...I know you'd like specifics. But where to start? And I apologize for the harsh words....but I am speaking from experience. We switched to all Redhat and Fedora servers...and it's been smooth sailing.

My best advice to you would be to run a test server with something like Fedora. Install PHP5/Apache/MySQL...work with it for a few weeks and you will know what I mean.
Link to comment
Share on other sites

[quote]Can you give me more info on why it sucks on a windows server.[/quote]

Its not really that PHP sucks on a windows servers, more the point that windows servers suck. PHP will run quite well on a windows server, there are of course some Linux specific functions missing (same as there are winblows specific function missing from a Linux install) but otherwise these shouldn't effect you.
Link to comment
Share on other sites

This has always been a hot topic, but I'll have to agree with it performing better on *nix environments. I'll quote Zend in this case, they give a nice explanation.

[quote]
The Windows PHP Challenge
Despite PHP’s promise as a multi-platform language, running it on Windows has been a challenge.  This is because PHP was written to perform in a UNIX environment where each request is handled by a different process.  Windows environments are architected to handle concurrent requests using multiple threads within a single process. This difference means that running PHP within a Windows Web Server results in frequent crashes.  Further, the only alternative solution to this instability ¾ running PHP in an external mode -- results in significantly slowed PHP performance. 
[/quote]

http://www.zend.com/news/zendpr.php?id=71
Link to comment
Share on other sites

That article is 2.5 years old...

[quote]Ramat Gan, Israel, March 30, 2004 ¾ Zend Technologies Ltd., the PHP ...[/quote]

I think that with the progress that they have made with PHP in the last 2.5 years the developers may be upset for quoting that article.

I've run PHP on a windows (2000 and 2003) server for over 2 years now and have never had a problem...at least not with it "crashing"
Link to comment
Share on other sites

[quote author=hitman6003 link=topic=118503.msg484485#msg484485 date=1166061110]
That article is 2.5 years old...

[quote]Ramat Gan, Israel, March 30, 2004 ¾ Zend Technologies Ltd., the PHP ...[/quote]

I think that with the progress that they have made with PHP in the last 2.5 years the developers may be upset for quoting that article.

I've run PHP on a windows (2000 and 2003) server for over 2 years now and have never had a problem...at least not with it "crashing"
[/quote]

Sure the article is old, but it still doesn't change the fact that Windows is built like it is. I can't say what or how PHP was functioning before PHP5 as I've just gotten into it myself, but it was more the explanation of how Windows is built, which plays a factor in the performance of PHP on Windows. I've never experienced any crashes, but I diden't write the article either - article writers tend to exagerate a bit - I run PHP on Windows/Apache myself, loving it.

Also, I'm sure there's a reason why Zend and Microsoft are teaming up to "improve performance of PHP on windows systems" - http://www.microsoft.com/presspass/press/2006/oct06/10-31MSZendPR.mspx.

This does not mean PHP on windows is bad at all, it just performs slower. Which was the question.

I love quoting, and I'll go ahead and do it again. This time a quote by Zend co-founder Andi Gutmans from Oct, this year, if that's new enough for you :). http://www.internetnews.com/dev-news/article.php/3641101

[quote]
"PHP has never really run very well on Windows. It does run on Windows but it doesn't perform very well; there are a lot of reliability problems."
[/quote]

You're just misunderstanding my point of posting the first link, it was in no way meant to bad mouth PHP on Windows, but an explanation why Nix systems outperforms Windows and mostlikely always will.
Link to comment
Share on other sites

I won't disagree with you that it runs slower on windows than linux, however, that does not imply a fundamental flaw in the way that php is executed within windows, but rather a difference in the execution of any program between windows and *nix.

My disagreement with your quote, and the reason I brought up the age of it, was because of this specific part:

[quote]running PHP within a Windows Web Server results in frequent crashes[/quote]

That, in my experience, is simply not true.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.