资 源 简 介
**php-forker** "php-forker" is a program written in C.
I is used to start console PHP scripts in the background from a PHP script serving a web request.
**Problem description.**
The usage of the PCNTL (Process Control support) extension applicable for the task, is not recommended in WEB scripts, and a plain "system()" call from a PHP script creates a zombie shell process:
system("/usr/local/bin/php script.php &");
As a solution, php\_forker demonizes a php-cli process that runs a console php script:
system("/usr/local/bin/php-forker /path/to/script.php arg1");
## Usage: ##
```
system("/usr/local/bin/php-forker /path/to/script.php one_arg ");
```
Where:
* /usr/local/bin/php-forker - full path to binary php-forker
* /path/to/script.php - full path to your php script
* one\_arg is the optional parameter for PHP script argument.
Using for hight-calculate or long-time process or conversing with AJAX:
* WEB pages start baground process and in the parametr point tmp-filename.