You are here: Forking a PHP process into the background in a web server environment « PHP Programming Language « IT news, forums, messages
Forking a PHP process into the background in a web server environment

Posted by JDS on 03/21/06 20:07

Hi. I have installed the PCNTL functions[1] on my PHP enabled webserver
in the interest of being able to fork a process into the background so I
can do some heavy processing but return control of the browser back to the
user rather quickly.

However, after mucking about with PCNTL for a while and not getting the
results I expected, I finally stumbled across this line in the opening
parragraph on PCNTL functions on PHP.net:

"Process Control should not be enabled within a webserver environment and
unexpected results may happen if any Process Control functions are used
within a webserver environment."

Seems like they should bold and highlight in red that line, but I digress.

In any case, can anyone suggest a way to fork a process off to unload a
large amount of processing and return control of the web browser to the
user? All the examples and whatnot I have found assume a CLI version of
PHP. I want to do this on the web server!

Thanks!!





[1]I am running Apache2/PHP4.3 on RHEL 4. I downloaded the RPM for PCNTL
at http://phprpms.sourceforge.net.

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация