How to run php on CGI

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

    #1

    How to run php on CGI

    Hi,

    I need some information ?

    How I can run my project (Php) on CGI.

    Thanks.


  • hakim

    #2
    How to run php on CGI

    Hi,

    I need some information ?

    How I can run my project (Php) on CGI.

    Thanks.




    Comment

    • Tony Marston

      #3
      Re: How to run php on CGI

      Configure Apache to run with the CGI version instead of the SAPI version.

      --
      Tony Marston

      This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL



      "hakim" <s_abdelhakim@h otmail.com> wrote in message
      news:mM3Tc.2514 1$a65.1035302@n ews20.bellgloba l.com...[color=blue]
      > Hi,
      >
      > I need some information ?
      >
      > How I can run my project (Php) on CGI.
      >
      > Thanks.
      >
      >
      >
      >[/color]


      Comment

      • steve

        #4
        Re: Re: How to run php on CGI

        "Tony Marston" wrote:[color=blue]
        > Configure Apache to run with the CGI version instead of the SAPI
        > version.
        >[/color]

        Question (for curious minds): Why would you run it as CGI, what are
        the advantages?

        --
        http://www.dbForumz.com/ This article was posted by author's request
        Articles individually checked for conformance to usenet standards
        Topic URL: http://www.dbForumz.com/PHP-run-CGI-ftopict139094.html
        Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=467187

        Comment

        • Andy Hassall

          #5
          Re: How to run php on CGI

          On 14 Aug 2004 14:08:44 -0400, steve <UseLinkToEmail @dbForumz.com> wrote:
          [color=blue]
          >"Tony Marston" wrote:[color=green]
          > > Configure Apache to run with the CGI version instead of the SAPI
          > > version.
          > >[/color]
          >
          >Question (for curious minds): Why would you run it as CGI, what are
          >the advantages?[/color]

          Most of the advantages are double-edged sword type things:

          Isolation from the webserver process (can't take down Apache if there's a
          major bug). But this comes with overhead in creating and destroying processes.

          You get more options as to the effective userid that the CGI script runs as,
          though, since it's a separate process and could be setuid to another user - if
          it's part of the Apache process, you can't do that.

          Resources get released back again after it runs, so it's not holding onto
          memory if the CGI script is only run sporadically. But if its run regularly,
          it's got to aquire and release the resouces over and over.

          There's things like FastCGI that work towards a midpoint between in-process
          modules and per-request spawned CGI processes. This page has a brief discussion
          of pros and cons:



          --
          Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
          <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

          Comment

          • steve

            #6
            Re: Re: How to run php on CGI

            "Andy Hassall" wrote:[color=blue]
            > On 14 Aug 2004 14:08:44 -0400, steve
            > <UseLinkToEmail @dbForumz.com> wrote:
            >[color=green]
            > >"Tony Marston" wrote:[color=darkred]
            > > > Configure Apache to run with the CGI version instead of the[/color][/color]
            > SAPI[color=green][color=darkred]
            > > > version.
            > > >[/color]
            > >
            > >Question (for curious minds): Why would you run it as CGI, what[/color]
            > are[color=green]
            > >the advantages?[/color]
            >
            > Most of the advantages are double-edged sword type things:
            >
            > Isolation from the webserver process (can’t take down Apache if
            > there’s a
            > major bug). But this comes with overhead in creating and destroying
            > processes.
            >
            > You get more options as to the effective userid that the CGI[/color]
            script[color=blue]
            > runs as,
            > though, since it’s a separate process and could be setuid to
            > another user - if
            > it’s part of the Apache process, you can’t do that.
            >
            > Resources get released back again after it runs, so it’s not
            > holding onto
            > memory if the CGI script is only run sporadically. But if its run
            > regularly,
            > it’s got to aquire and release the resouces over and over.
            >
            > There’s things like FastCGI that work towards a midpoint
            > between in-process
            > modules and per-request spawned CGI processes. This page has a[/color]
            brief[color=blue]
            > discussion
            > of pros and cons:
            >
            > http://www.fastcgi.com/devkit/doc/fa...er/fastcgi.htm
            >[/color]

            Ok, got it. Thanks, Andy.

            --
            http://www.dbForumz.com/ This article was posted by author's request
            Articles individually checked for conformance to usenet standards
            Topic URL: http://www.dbForumz.com/PHP-run-CGI-ftopict139094.html
            Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=467220

            Comment

            Working...