NYCPHP Meetup

NYPHP.org

[nycphp-talk] Re: Getting HTTP status code

Emmanuel Décarie emm at scriptdigital.com
Wed Nov 10 09:29:15 EST 2004


>Date: Tue, 9 Nov 2004 18:53:49 -0800 (PST)
>From: Chris Shiflett <shiflett at php.net>

>--- Emmanuel Décarie <emm at scriptdigital.com> wrote:
>> Before I look in my books or on the Web, anyone has a pointer to
>> what in the Apache world is called by mod_perl developers (and
>> probably others I guess) the "request loop". I'm definitely
>> interested to read more about this to clear my head on the
>> question, although, maybe it makes no sense in the context of PHP.
>> I'm especially interested in how PHP handle the request from
>> Apache/IIS (CGI/Fast CGI).

>Well, it only makes sense in an Apache context, of course.

Ah sorry, I was not crystal clear about this. I used mod_perl as a
comparison. What I'd like to find is some pointers that explain how PHP
handle the request from the server when running for example, as a module
in Apache, and the same thing when PHP is running as a CGI with IIS for
example. What is exposed in PHP that comes from the server, and how to
get the "raw" request that is passed to PHP before its parsed in PHP
Superglobals.

>Geoff Young (one of the core mod_perl developers and last month's
>speaker) gives a talk every once in a while named something like
>Programming the Apache Lifecycle. You can probably find some slides
>online somewhere. There's also this 6 page PDF from his book:
>
>http://www.modperlcookbook.org/chapters/part3.pdf

Thanks, I have this book and the "Writing Apache Modules". But I never
really read these books. Just after getting them, I was "force" to learn
PHP for a job, and then, never look back. One of the best thing that
happened in my programmer life. Although before I really learned PHP, I
read a lot about it, and looked at the language, and found it awful, and
had my head full of stereotypes about PHP (like the famous quote from
Randal L. Swartz: 'PHP - it's "training wheels without the bike"'
<http://perlmonks.thepen.com/18694.html>).

>If you're interested in playing around with more than just the content
>generation bit, George Schlossnagle wrote a SAPI called apache_hooks.
>It exposes much more of the Apache API, although I've never actually
>played with it (I keep meaning to). He'll probably speak up and
>mention that it's most likely broken, since I don't think he's touched
>it in a while, but it's worth a try. :-)

This look interesting. I see it mentioned in its last book (I just
checked the index).  apache_hooks when stable could be a great addition
to the PHP toolbox.

Cheers
-Emmanuel
--
Emmanuel Décarie / Programmation pour le Web - Programming for the Web
<http://scriptdigital.com/> - Blog: <http://blog.scriptdigital.com> - AIM: scriptdigital



More information about the talk mailing list