2

One of background scripts in my project uses PCNTL to fork. Also, I have a requirement checker script that should be run by user before script installation. Since pcntl can be accessed only in CGI mode, both function_exists('pcntl_fork') and extension_loaded('pcntl') return FALSE in Web mode, so my checker shows always requirement error, as it launched via browser, even if it is enabled. Is there any method to check pcntl support is enabled from web mode?

4

1 回答 1

1

由于没有人回答,我想我应该指出您可以创建一个独立的 PHP 脚本来检查 pcntl 的存在,然后使用 PHP CLI 运行该脚本,例如使用execsystem

于 2013-03-30T15:33:38.273 回答