Re: Is it possible to avoid loading the script for each request



On Jun 1, 12:00 am, DavidNorep <avdavid.nore...@xxxxxxxxx> 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

.



Relevant Pages

  • Re: Why PHP is so succesfull?
    ... Trent> sounds like a lot of hassle to me. ... I've never written CGI scripts with Java myself. ... copying my first Hello World CGI java script to your ...
    (comp.programming)
  • Re: Apache: limiting the execution place
    ... They want it so users can't use FTP, shell, or a CGI or PHP script to view, ... other users via shell, FTP, web server processes (such as PHP or CGI ...
    (Security-Basics)
  • Re: Upload files message
    ... the Perl upload works by using one script to save the ... Would be fairly simple to implement the same functionality with a PHP CGI. ... having the window there already, in a little iframe on the page. ...
    (comp.lang.php)
  • Re: Recommend PHP-Based Dashboard?
    ... and this is to illicite a response from php developers in a php usenet group trying to foster some kind of fear in us all that you may change your mind and go java or windows or mac? ... as i run true cgi scripts from the cgi exe *all the time* from the command-line, i assure you that you're wrong. ... the above explicitly states that i must use a feature of cgi in order to be considered a cgi script. ...
    (comp.lang.php)
  • Re: Recommend PHP-Based Dashboard?
    ... and this is to illicite a response from php developers in a php usenet group trying to foster some kind of fear in us all that you may change your mind and go java or windows or mac? ... as i run true cgi scripts from the cgi exe *all the time* from the command-line, i assure you that you're wrong. ... the above explicitly states that i must use a feature of cgi in order to be considered a cgi script. ...
    (comp.lang.php)