Python vs PHP (mod_python vs. mod_php)

Jon Perez jbperez808 at wahoo.com
Mon Oct 25 21:25:54 EDT 2004


Shufen wrote:
> Hi all, 
> 
> 
> Can someone who has use PHP before and know quite well about the
> language, tell me what are the stuffs that Python offers and PHP
> doesn't. A few examples will be nice. I know about the date format
> problem which PHP is having but I need more examples. Thank you for
> any help.
> 
> Shufen

Python is just a plain better language.  I use both
PHP and Python heavily and finishing the same task in
Python takes half the time in most cases, if not less.

Unfortunately, mod_python deployment is a minute fraction
of that of mod_php, and that is why Python is way less
popular as a server-side scriptiong solution.

Doing some research on why this is so reveals some 2-3
year old posts that mention that it takes more effort to
configure mod_python for stability and security on shared
web hosts.  Why?  Because Python lets you do more advanced
stuff compared to PHP (specifically having to do with
importing modules) that may inadvertently or deliberately
crash the server if misused.  Thus, for mod_python hosting
to be reliable, you have to give each user their own instance
of the Apache server (proxied through a central instance of
Apache).

This might, in fact, no longer be needed with the latest
mod_python, but I leave that to the mod_python experts in
this newsgroup to expound upon if so.

As a (former) PHP fan myself, I found Spyce (spyce.sf.net)
to be the closest in philosophy and ease of use to PHP and
I highly recommend it to those who want to experiment with
making the switch from PHP server-side to Python server-side.



More information about the Python-list mailing list