On 7/14/07, Rasmus Lerdorf <[EMAIL PROTECTED]> wrote:
Tijnema wrote:
> On 7/14/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote:
>> > The Apache2handler SAPI should be loaded first, and read the very
>> > first line of the PHP script to determine if a version is specified
>> > there. If not, the handler needs to load its default PHP version. If
>> > it is specified, it should try to load that version, and if it
>> > couldn't find or load that version, fall back to the default version
>> > and issue a warning.
>>
>> This means the engines would have to init/shutdown on each request,
>> which makes it as bad as CGI.
> Is that really a big problem?
If you care at all about performance, yes.
Well, I do, because if I don't, it won't be accepted anywhere.
> And isn't that what Apache currently does?
No, of course not. The whole point of the Apache module version of PHP
is to keep PHP in memory across requests and only call the MINIT and
MSHUTDOWN hooks on server startup and shutdown.
Thank you for your very short manual on Apache Module. So, the only
way I can implement this (without the performance hit), is by loading
all PHP version at once at startup of apache, which will increase
startup time, but that shouldn't be a problem. A more worrysome thing
is the memory usage, I don't think that in the code is described how
much memory it takes to load and startup PHP, can you give an
estimate?
Not to sound too elitist here, and this is directed just at you
personally, but if you are going to post to the internals list, you
should have some notion of how PHP works internally. We don't mind
people who don't work on the code posting here occasionally, but please
keep in mind that it is our primary means of communicating amongst the
people working on the code and lately it has gotten a bit hard to pick
out the useful stuff from the chatter.
-Rasmus
Thank you for clarifying the intention of this list, as I had another
intention of it. So, I'll start studying (docs of) the code soon. I
think it would be the best to actually work with the core too, so I
think I'll just start to implement this idea while learning how
everything works.
Tijnema
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php