Re: [PHP4BETA] Re: [PHP3] Re: [PHP4BETA] Writing Apache modules in PHP
| From: | Chris Adams | Date: | Sun, 12 Mar 2000 20:37:32 +0000 |
| Subject: | Re: [PHP4BETA] Re: [PHP3] Re: [PHP4BETA] Writing Apache modules in PHP | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11979@lists.php.net to get a copy of this message | ||
>John Coggeshall wrote:
>>
>> >reason. If you're talking about being able to write a module in PHP
>> >instead of C then you should probably talk to the Apache guys.
>>
>> Wouldn't that be a great thing? If you could write apache modules in PHP?
>> They wouldn't be half bad with the Zend Compiler, either!
>
>Does anyone know how Perl (mod_perl?) does it? Are the modules written
>in Perl and then compiled into the server somehow?
As I understand it (this is the cue for someone to explain in detail how I
don't get it. <g> My involvement with the mod_perl source ended at the "./
configure; make; make install" level.), at a high level mod_perl does two
things:
1) Allow the Perl interpreter to be embedded in the Apache process. (There are
some non-trivial implementation details here)
2) Provide code for the normal C module hooks that calls Perl. The idea being
that the Apache webserver doesn't need to treat mod_perl differently from other
C modules since part of mod_perl is a regular C module that just happens to
call Perl to do the actual work.
I really like the idea of extending mod_php to provide functionality closer to
mod_perl. You can do very interesting things with code that gets called that
early in the request process and I think PHP would provide an easier means of
doing so.
--
# Chris Adams <chris@digitaria.com> (619)237-5552
# Technology Integration Specialist, Digitaria LLC