Python v PHP for web, and restarting Apache?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • walterbyrd

    #1

    Python v PHP for web, and restarting Apache?

    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.

  • Marc 'BlackJack' Rintsch

    #2
    Re: Python v PHP for web, and restarting Apache?

    In <1163783247.077 263.8590@j44g20 00cwa.googlegro ups.com>, walterbyrd
    wrote:
    I am not trying to suggest anything here. I'm just asking.
    Asking what? Asking something usually involves a question. ;-)

    Ciao,
    Marc 'BlackJack' Rintsch

    Comment

    • gabor

      #3
      Re: Python v PHP for web, and restarting Apache?

      walterbyrd wrote:
      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

      Comment

      • Michael Ströder

        #4
        Re: Python v PHP for web, and restarting Apache?

        walterbyrd wrote:
        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.

        Comment

        • sandra.eloff@gmail.com

          #5
          Re: Python v PHP for web, and restarting Apache?

          On Nov 17, 12:07 pm, "walterbyrd " <walterb...@ina me.comwrote:
          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

          Comment

          • gavino

            #6
            Re: Python v PHP for web, and restarting Apache?



            On Nov 17, 4:46 pm, sandra.el...@gm ail.com wrote:
            On Nov 17, 12:07 pm, "walterbyrd " <walterb...@ina me.comwrote:
            >
            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
            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?

            Comment

            • walterbyrd

              #7
              Re: Python v PHP for web, and restarting Apache?


              sandra.eloff@gm ail.com wrote:
              >
              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?

              Comment

              • Fredrik Lundh

                #8
                Re: Python v PHP for web, and restarting Apache?

                walterbyrd wrote:
                >Python is much better suited to writing and mainting large web
                >applications though.
                >
                I have to ask: why is that?
                modularity, modularity, and modularity.

                </F>

                Comment

                • walterbyrd

                  #9
                  Re: Python v PHP for web, and restarting Apache?


                  Fredrik Lundh wrote:
                  >
                  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.

                  Comment

                  • Bruno Desthuilliers

                    #10
                    Re: Python v PHP for web, and restarting Apache?

                    walterbyrd a écrit :
                    Fredrik Lundh wrote:
                    >
                    >
                    >>modularity, modularity, and modularity.
                    >>
                    >
                    >
                    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...

                    Comment

                    Working...