FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » writing php scripts for fastcgi environments
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: writing php scripts for fastcgi environments [message #173295 is a reply to message #173293] Sat, 02 April 2011 00:17 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 4/1/2011 7:12 PM, Michael Vilain wrote:
> In article<4d9614d0$0$14967$bed64819(at)gradwell(dot)net>,
> Denis McMahon<denis(dot)m(dot)f(dot)mcmahon(at)gmail(dot)com> wrote:
>
>> Hi
>>
>> Bit of a conundrum.
>>
>> The commercial linux hosting that a website uses has some sort of fastcgi
>> implementation that handles the php scripts. I've looked several times,
>> but my google fu is failing. I can find plenty of discussion relating to
>> fastcgi configuration, and using fastcgi on IIS etc, but I'm struggling
>> to find any suggestions or recommendations on optimising php scripts that
>> will be running in a fastcgi environment.
>>
>> Are there dos and don'ts for php in a fastcgi environment, over and above
>> normal coding practices, or is fastcgi irrelevant at the level of writing
>> the script?
>>
>> Rgds
>>
>> Denis McMahon
>
> I can't speak to the exact implementation of fastcgi, but cgi in general
> forks a process to run a shell that executes the program. Here's some
> discussion on fastcgi
>
> http://www.fastcgi.com/drupal/node/6?q=node/15
>
> You can run php scripts either directly as threads within the memory
> space of the web server (usually Apache). This is the mod_php
> implementation and must run on the same machine as the Apache server.
>
> Or you can run the script as a separate process either on the local
> machine with the web server or on another machine.
>
> What's your specific concern here? AFAIK from the above page, you write
> a script and it will run via CGI or on a fastcgi implementation
> unchanged.
>

Yes and no. There are differences between running PHP as a mod and CGI,
mainly in the $_SERVER array. Scripts running under mod_php will not
necessarily run under fastcgi. You need to check the doc.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: relative v. absolute paths
Next Topic: Posting and redirecting to remote script
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 07:31:57 GMT 2024

Total time taken to generate the page: 0.04433 seconds