Re: Question about apache-php concurrent process control

From: Date: Sat, 16 Jul 2005 01:41:30 +0000
Subject: Re: Question about apache-php concurrent process control
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-218790@lists.php.net to get a copy of this message
Hi Rasmus, You are right. It was the problem with the browser. I used Mozilla Firefox to try, and do not know what consideration it just serialized the identical url http requests. I then turned to use 2 IE 6.0 windows, 2 tabs within Maxthon browser, one IE windows and one Firefox, to test. Then I got the conclusion as you told. Thank you very much for the help. BTW, I could not get the flush() work, neither flush() with ob_flush(). I tried almost all methods mentioned in the followed posts under http://us2.php.net/flush, but none of them can really pushed the buffer out. The site 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 <?php
       sleep(20);
       print  Done. <br />";
?> I place request from 2 browser windows. First time, I placed with http://baseURL/a.php with both 2 browsers, starting times have 5 second interval. Then the first "Done" shows after 20 seconds and the second "Done" shows 20 seconds after the first "Done". Then, I placed one browser with http://baseURL/a.php and the second one with http://baseURL/b.php, with starting time of 5 second interval. Then I got the first browser showing "Done" after 20 seconds and 5 seconds later, the second browser showed "Done", too. Thus it seems that the apache can spoon out multiple php interpreters responding to http requests, while php can not deal with concurrent process from one program. I have no idea what you did to configure it this way. I wouldn't even know how to do that if you asked me to. As far as PHP is concerned it has no idea which processes are handling which script files at any one point. So whether you request a.php and b.php at the same time or a.php twice at the same time, it makes absolutely no difference to PHP. If you are really seeing this, then the limitation is in your browser or somewhere else. Try making a.php output stuff so it becomes easier to see. As in for($i=0;$i<20;$i++) { echo $i; flush(); sleep(1); } You should see the counter start counting as soon as you hit the page. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#218790) next »