My point was that this is true for any language.
You seem to be suggesting that the odds of picking a web server at random and having it be so configured for a given language is pretty low, which seems like quite a different issue, and (in my view) a pointless one. Nobody picks a webhost at random and just hopes that they have support, so the question is can you find support if you want it. :)
In any case, it's also incorrect in the case of Python and arguably Ruby. The first three mass-market shared webhosts I can think of are Dreamhost, Webfaction, and Hostgator. Without any configuration at all, Dreamhost supports both Python and Ruby scripts as CGI programs, Hostgator supports Python scripts as CGI programs, and I believe Webfaction does as well.
(Node is a lot newer and, admittedly, doesn't seem to have any support among mass-market shared webhosts.)
I think, because PHP servers are so stable, that's part of why they're so common on shared web hosts. For example, running a WSGI server is much more complicated. If a WSGI app goes bonkers you have to restart the relevant server. In mod_php, just kill the process.
What would be interesting is a forking-style server for Python or another reasonable language.
1) PHP is commonly implemented via CGI by many webhosts, even today. Not only is it generally considered more secure, but it lets you easily run multiple versions behind the same Apache instance. The performance hit isn't bad, either. So I'm not sure what "PHP is ... better than CGI" even means.
2) PHP is not particularly stable and it is not uncommon for a PHP process to hang until killed, often soaking up 100% CPU time. The stateless nature does make it easier to just kill it whenever it goes crazy, but it doesn't really have anything to do with how often it goes crazy.
3) You can configure servers in all sorts of ways, but there's nothing inherently harder about WSGI. You absolutely can just "kill the process".
4) I honestly have no idea what you mean by "a forking-style server for Python". Is there something you dislike about all the current ones? :)
http://news.ycombinator.com/item?id=3826416
(@lmm: Sorry, I can't reply directly to your post.)
I'm willing to believe this - but if it's true, where are the cheap shared webhosts with WSGI enabled? Or do you think there's some other reason PHP is so much more widely available?
It's very rare to find webhosts that configure Python, Ruby, Node or the rest to be as easy as "upload a file, click reload."
One reason is the wonderful statelessness of mod_php's execution model: it forks a new process for every request, and destroys it at the end. It's inherently a much more stable environment than the competitors -- you can't save anything inside the interpreter for future requests. This makes server administration easy, and probably shared hosting easier to manage.