|
Posted by NC on 06/02/07 17:41
On Jun 1, 12:00 am, DavidNorep <avdavid.nore...@gmail.com> wrote:
>
> I do not know PHP, consider to write a CGI with this technology and
> have the following question.
>
> Is it possible to invoke a PHP script and let it endlessly wait for
> requests from a website (a Java applet in my case) and serve the
> requests when they arrive? I want to avoid loading the script for
> each request.
No. But you don't have to configure your PHP setup as CGI;
configuring
it as an Apache module with an accelerator will do pretty much what
you
want; at the first call, the script will be compiled into bytecode
and
the bytecode will be cached, so beginning with the second call, the
script will not be loaded; cached bytecode will be used instead.
> In other words, can it function, in this sense, like a Java servlet?
PHP is not Java. If you want something to function like a Java
servlet,
you should implement it as a Java servlet.
Cheers,
NC
[Back to original message]
|