Python v PHP for web, and restarting Apache?

W

walterbyrd

I think I have read somewhere that using Python to develop
web-applications requires some restarting of the Apache server, whereas
PHP does not.

Also, I seem to remember reading something about PHP being able to
recover from Apache restarting more easily than Python.

I am not trying to suggest anything here. I'm just asking.
 
M

Marc 'BlackJack' Rintsch

walterbyrd said:
I am not trying to suggest anything here. I'm just asking.

Asking what? Asking something usually involves a question. ;-)

Ciao,
Marc 'BlackJack' Rintsch
 
G

gabor

walterbyrd said:
I think I have read somewhere that using Python to develop
web-applications requires some restarting of the Apache server, whereas
PHP does not.

first thing... there are many many ways how to run a python-apache web
application..

- mod_python
- cgi
- fastcgi
- sci
- proxy

also the same way, for php:
- mod_php
- fastcgi
- cgi
- (maybe something more, i'm not much experienced with php)

so first you should tell us which python-solution would you like to
compare to which php-solution..


gabor
 
?

=?ISO-8859-1?Q?Michael_Str=F6der?=

walterbyrd said:
I think I have read somewhere that using Python to develop
web-applications requires some restarting of the Apache server, whereas
PHP does not.

Using Python to develop web-applications is a very broad topic.

E.g. you don't have to restart Apache if you develop simple
short-running CGI-BIN programs. With a long-running web app (e.g. with
FastCGI) you might only kill the web app's process etc. Or you implement
a graceful restart in your web app or...
Also, I seem to remember reading something about PHP being able to
recover from Apache restarting more easily than Python.

As usual it depends.

Ciao, Michael.
 
S

sandra.eloff

I think I have read somewhere that using Python to develop
web-applications requires some restarting of the Apache server, whereas
PHP does not.

It depends what you do. CGI's operate much like PHP. mod_python has
auto-reloading (and by implication most frameworks that build on it.) A
poorly designed web application may require a restart. (Some people
also disable auto-reload for production servers for performance
advantages.)
Also, I seem to remember reading something about PHP being able to
recover from Apache restarting more easily than Python.

I can think of no reason why that would be true. Perhaps these are
poorly designed python applications?
I am not trying to suggest anything here. I'm just asking.

Ask away. The only bad question is an unasked question. Most of us can
act like adults here (although we all forget that from time to time.)

Python is much better suited to writing and mainting large web
applications though. Being both an experienced php and python
programmer, I can tell you I don't use php any more unless I have no
other choice.

-Sandra
 
G

gavino

auto-reloading (and by implication most frameworks that build on it.) A
poorly designed web application may require a restart. (Some people
also disable auto-reload for production servers for performance
advantages.)

poorly designed python applications?

act like adults here (although we all forget that from time to time.)

Python is much better suited to writing and mainting large web
applications though. Being both an experienced php and python
programmer, I can tell you I don't use php any more unless I have no
other choice.

-Sandra

Sandra do you us ethe msot up to date php and python?
how fast is fastcgi v mod_python?
Have you ever used medusa? or some other python server directly?
 
W

walterbyrd

Python is much better suited to writing and mainting large web
applications though.

I have to ask: why is that? Because Python is more readable? Because
Python runs faster? Is Python more stable for large scale applications?
Does this apply when using Python with CGI, FastCGI, mod_python, or
what?
 
W

walterbyrd

Fredrik said:
modularity, modularity, and modularity.

Can't PHP be made to be just as modular?

As a matter of popular practise, I suppose that is not done. I would
think that it could be.

My big problem with PHP is the lack of backward compatibility. My big
problem with Python is that popular frameworks like django and
turbogears have sky-high system requirements. Few web-hosters have
Apache 2.X, mod_python 3.x, FastCGI, or Python 2.4.
 
B

Bruno Desthuilliers

walterbyrd a écrit :
Fredrik Lundh wrote:




Can't PHP be made to be just as modular?

PHP has no notion of modules.
As a matter of popular practise, I suppose that is not done. I would
think that it could be.

Certainly not the way Python is modular...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top