RE: [PHP] Question about exec() call an CLI php script from Apache CGI/filter module PHP

2005-07-28 Thread Liang ZHONG
I forgot to mention that calling from shell directly s.php runs correctly. ~ marvin:~/liang.ns2user.info/php> ./s.php This is a PHP-CLI Script!!0123456789 ~ The php configuration of this site is: http://liang.ns2user.info/php/info.php Thank you i

[PHP] Question about exec() call an CLI php script from Apache CGI/filter module PHP

2005-07-28 Thread Liang ZHONG
I call red.php through apache http request, and red.php make exec('./s.php') call, then I got bunch of s.php processes, and system locked me out any task due to no more processes available. Why this would happen? marvin:~/liang.ns2user.info/php> less red.php marvin

[PHP] Question on exec() to call a php script from a php script

2005-07-27 Thread Liang ZHONG
If my php is configured as ( http://liang.ns2user.info/php/info-train06.htm) an apache 2.0 filter module. The php is invoked by apache on request of http client. Can I do an exec() to call another php script to run in the background? If yes, how? Highly appreciate if somebody helps. Thank you.

Re: [PHP] On register_shutdown_function: What might be the problem?

2005-07-26 Thread Liang ZHONG
. I really appreciate all kindly help from you. Liang Liang ZHONG wrote: > The php configuration is: http://liang.ns2user.info/php/info.php. I have > no read permission of those httpd.conf files so do not know how apache > configured. That shows PHP is running as a CGI. As a CGI PHP

Re: [PHP] On register_shutdown_function: What might be the problem?

2005-07-26 Thread Liang ZHONG
8 foo <10 second delay here> Connection closed by foreign host. -Rasmus Liang ZHONG wrote: > Thank you for replying. Sorry for being long again. > I tried your suggestion of this: > > ignore_user_abort(true); > header("Location: redirect2.html"); > echo "

Re: [PHP] On register_shutdown_function: What might be the problem?

2005-07-26 Thread Liang ZHONG
) your script will be terminated as soon as it tries to send something further and your shutdown function will be called at that point. -Rasmus Liang ZHONG wrote: > Hi Rasmus, > > This may be a little bit long, sorry for taking your time. > > It still does not work as expected. I tried som

Re: [PHP] On register_shutdown_function: What might be the problem?

2005-07-26 Thread Liang ZHONG
you very much again. Liang Try somthing lik e this: Liang ZHONG wrote: > Sorry, does not seem to work here. The code below takes minutes to show > up in browser. > > Any more suggestion? >

Re: [PHP] On register_shutdown_function: What might be the problem?

2005-07-22 Thread Liang ZHONG
respect, Liang Liang ZHONG wrote: > My Question is: > What is the correct way to keep the function running after I redirect an > existing page to http client (which I want the client get immediately) > and then immediately close the connection? ignore_user_abort(true); -Rasmus --

Re: [PHP] On register_shutdown_function: What might be the problem?

2005-07-22 Thread Liang ZHONG
connection? Thank you very much. Given it's a fatal error, it's as bad as a syntax error. It cancels everything it's doing and leaves. Remember that, even the shutdown function has to obey the time limit. On 7/22/05, Liang ZHONG <[EMAIL PROTECTED]> wrote: > > set_

[PHP] On register_shutdown_function: What might be the problem?

2005-07-22 Thread Liang ZHONG
When the time_limit is set to 0, the redirect page will be shown in 20 second after the file ccc is created. When the time_limit is set to 5, the redirect page will be shown in 5 second and the ccc file is not created. The error from curl command line tool is as: ---

Re: [PHP] Question about apache-php concurrent process control

2005-07-22 Thread Liang ZHONG
Thank you Richard, I think I'd better explain a little about the project and then you or somebody else might give some good suggestion upon the restrictions of the project. The project is to implement a digital library protocol, called oai_pmh (http://www.openarchives.org/OAI/openarchivesprot

Re: [PHP] Question about apache-php concurrent process control

2005-07-21 Thread Liang ZHONG
I now encounter a problem with flow control of my program with PHP. This is very crucial to the design of a pretty big project. This is what I want to do in the program: Since it takes do_B() quite a while to finish, so I want the http client get the partial result from do_A() by redirect a

RE: [PHP] Question about apache-php concurrent process control

2005-07-19 Thread Liang ZHONG
Can somebody here help me to delete my message? People who read this must be laughing at me. :) It seems Rasmus is famous, and I should have shown my respect. PHP succeeds an older product, named PHP/FI. PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl scrip

Re: [PHP] Question about apache-php concurrent process control

2005-07-19 Thread Liang ZHONG
Hi André, It sounds interesting. But since I am pretty new to PHP, I have some questions, naive maybe, about what you wrote. "#!/bin/sh\n/path/to/script/Send.php 12 &\n" What does the Send.php look like? I do not have idea how a shell interprets an php script and what the parameter 12 means

Re: [PHP] Question about apache-php concurrent process control

2005-07-19 Thread Liang ZHONG
Thank you Rouvas, I never used the tools you mentioned. But I will definitely give them a try. I wrote a perl script using LWP as an http user agent. and the timing function you suggested. It works well. I am new to this forum, and new to PHP. It seems Rasmus is famous, and I should have sh

Re: [PHP] Question about apache-php concurrent process control

2005-07-15 Thread Liang ZHONG
is configurated with http://liang.ns2user.info/php/info.php on Red head, kernel 2.4.29. What can I do to get it work? Thank you again. Liang ZHONG wrote: > Could you please explain it a little bit more? > I did test this way. > > The code is the same for a.php and b.php > &g

Re: [PHP] Question about apache-php concurrent process control

2005-07-15 Thread Liang ZHONG
ue to the php's design limitation, or I did not configure the php correctly to fulfill its full functionality? Thank you Liang ZHONG wrote: > As I know, apache-php works this way. When the web server gets an http > request with file name extension ".php", it will start t

Re: [PHP] Question about apache-php concurrent process control

2005-07-15 Thread Liang ZHONG
As I know, apache-php works this way. When the web server gets an http request with file name extension ".php", it will start the php interpreter to process the php file. Now I have a php program does something like this: when it is executing with one parameter p1, the program code goes to con

[PHP] Question about apache-php concurrent process control

2005-07-15 Thread Liang ZHONG
I am a programmer and new to php. I wonder what process control can php interpreter do for multithreading . I notice that through http request, php interpreter can execute 2 php programs simataneously, but will only sequentially queued and execute if I try to execute one php code in the same ti