RE: [PHP-DEV] Inclusion of PHP LiteSpeed SAPI in the standard PHP distribution?

From: Date: Tue, 25 Mar 2008 20:13:49 +0000
Subject: RE: [PHP-DEV] Inclusion of PHP LiteSpeed SAPI in the standard PHP distribution?
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-36519@lists.php.net to get a copy of this message
> > Is there a generic solution for SAPIs? > > The stuff is pretty generic, just check how it's done for > sapi/cgi/cgi_main.c in > function sapi_cgi_activate(). (IIRC :) > > I think I even put some comments in there.. Yes, looks good. Even the host-based config could be enabled by NSAPI. The code looks very generic and could be put directly into a generic SAPI function that runs after register_variables. You only need then _SERVER['DOCUMENT_ROOT'] (the length) and the script filename and HTTP_HOST/SERVER_NAME which is registered by every SAPI. One problem is in the per dir user config code: If one maps an alias for a directory containing the PHP scripts into his webserver config, the document root may not be a substring of the script file name, which would be a problem for the user config loading algorithm... You put the code into activate, but it may also be possible to do all this in the request startup I think...? I think we should discuss this in an extra thread. I would be happy to help with a generic solution (e.g. before script startup) and would help in implementing it! Uwe

« previous php.internals (#36519) next »