ID: 24590
Comment by: dpenning at s0nix dot de
Reported By: james at grickel dot org
Status: Open
Bug Type: Feature/Change Request
PHP Version: Irrelevant
New Comment:
imho this should be implemented as an php-extension.
then the user would have to run the script via php-cli
Previous Comments:
------------------------------------------------------------------------
[2003-07-10 10:19:33] james at grickel dot org
Description:
------------
Currently PHP's FastCGI's code just keeps php loaded while the script
is executed over and over every time.
I'm proposing a system where fastcgi could be natively used by the php
script. Like how fastcgi is used in perl, or C.
The code could possibly look something like this:
------------------
#!/usr/bin/php-fastcgi
<?php
do_init();
while(fastcgi_next_request() != null) {
do_request_stuff();
}
do_shutdown();
?>
------------------
This would allow large scripts that load lots of data to keep them
loaded and serve many requests.
This would be very advantagous for performance. The script itself would
look like a fastcgi script to the server. Not the php executable. So
you wouldn't be able to use the apache Action directive. You'd just
need to have the hash-bang in every php file.
I'm not familiar enough with php's sapi, nor fastcgi. But from what I
know it should be possible if you don't use treat the php _script_ as a
cgi and use the hash-bang on every file.
Thanks,
James Harr
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24590&edit=1