Fog Creek Software
Discussion Board




Is PHP viable for a simple data server on Win/IIS?

Hi All,

I'm going to be building a simple data server in the near future and I'm begining to consider the approach. This will act as a web service server, accepting parameters, submitting them to the DB (Access, MS SQL, MySQL, or Oracle) and returning the results (Not sure if it will be through SOAP, XML-RPC, or REST).

Normally I'd whip this up in C#/ASP.NET, but it would be great if I could support other platforms as well. As this will just need to act as a web interface for the db, this may be a good candidate for a cross-platform approach. It appears that PHP should fit the bill nicely, but something actually working cross platform seems like an urban legend to me.

Obviously PHP runs fine on Linux/Unix/OS X, but is it actually stable on Windows with IIS? I'm going to run some tests, but thought I'd ask to see what the consensus is. Beyond stability, is it generally accepted in the data center or are Windows sys admins going to turn up their noses at the thought?

Thanks for the input,

  --Josh

JWA
Friday, January 16, 2004

Windows should work fine, thou there are some subtle differences in the Unix and the window. if you plan to use IIS, considet to use FastCGI. the php site is a very good site for information

eddy
Friday, January 16, 2004

Python seems to be stable on multiple platforms.

m
Friday, January 16, 2004

Question for the Python folks, can you serve Python-generated pages using compiled Python scripts? Or must they remain in source form?

Dumb question
Friday, January 16, 2004

Josh, yes, it is absolutely reliable under IIS.  And it is very snappy even running as a CGI (haven't tried it under ISAPI, etc. due to stability issues with PHP 4.0.x).  I wrote an extensive app for a large company, used by about 4,500 internal support people, using a dual CPU IIS server and CGI PHP.  It works very, very well.

BTW, PHP rocks.

dir at badblue dot com
Friday, January 16, 2004

dir at badblue dot com,

If you were developing an internal app for a fixed Windows platform, why you chose to use PHP over natively supported ASP? I'm curious as to what the advantages were for you.

  --Josh

JWA
Saturday, January 17, 2004

*cough* "Normally I'd whip this up in C#/ASP.NET, but it would be great if I could support other platforms as well." *cough*

Cross platform is a requirement...  hence PHP.

Almost Anonymous
Saturday, January 17, 2004

Zope is written in Python and need only be in compiled .pyc files, so the answer to that question is yes.

If its just going to serve data then I'd usually use Perl for the server and in the database generate XML that can be styled using stored procedures.  IIS wouldn't be needed at all.

Simon Lucy
Saturday, January 17, 2004

Several reasons to go w/PHP:

1) PHP at the time was a far more powerful language for web development than ASP (and easier from a syntax perspective); check out explode(), associative array - and nested associative array - support, auto type flexibility and conversion when outputting to the page... it's simply much faster for web development

2) Platform independence, given uncertain direction of server hosting at this company (i.e., Linux hosting was

3) Easy-to-install extension support (e.g., LDAP) that requires no registration of COM objects or other complex installation protocols

Great database support (and PHP's ODBC extension is excellent), fantastic user community, Zend Encoder... the list goes on and on.

dir at badblue dot com
Saturday, January 17, 2004

"HP at the time was a far more powerful language for web development than ASP"

What time are we talking about? Pre-.NET?

m
Saturday, January 17, 2004

Yes, before net, PHP was head and shoulders above ASP.

ASP .NET changed the game.

Jax
Saturday, January 17, 2004

Does ASP.NET make you more productive than PHP, or allow you to do things that would be difficult in PHP?


Saturday, January 17, 2004

Each has its advantage, really depends on whether your project can benefit from them.

Li-fan Chen
Saturday, January 17, 2004

I have used PHP extensively with IIS over the last two years and it has been very stable.

James Ussher-Smith
Saturday, January 17, 2004

The feeling I have is that php is more for QAD (quick and dirty) sites while  asp.net is more for something bigger and can be over kill for a small site

Yon
Saturday, January 17, 2004

Powerful is a very subjective thing.

I think of the OO, multi-language, multi-tiered architecture of .NET as giving you "powerful" design options.

I think of the scripting mindset behind PHP gives you a "powerful" method of getting functional code up and running quickly.

m
Saturday, January 17, 2004

PHP is a fine language for large systems.  My ideal choice though remains C and C++.  gSoap generates reliable platform independent code.  As an added perk it is capable of acting as its own server, eliminating the need for any web server (although it works fine as a CGI).  I've run the same code on both Windows and UNIX without any problem.

If you feel a need to render HTML output, you can also pick up the templating library I use from my site: http://www.lazarusid.com/libtemplate.shtml

Clay Dowling
Sunday, January 18, 2004

For small things PHP is a viable choice. Just make sure this is not something that will "grow" into something larger. You don't want to do PHP for more serious stuff.
Under Windows don't expect performance. Again, this is not a issue for 95% of the sites out there that would run fine on a 486dx if it had sufficient memory, but if you epect high load or serious DB interactions, use something else.
If you have to do a lott of "internationalization", this might be another indiocation you'll be happier with another choice.

If these things don't apply: PHP on Windows will be fine for a small Web fronted DB project.

Just me (Sir to you)
Monday, January 19, 2004

*  Recent Topics

*  Fog Creek Home