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?

Sam
  • 7,252
  • 16
  • 46
  • 65
WindBridges
  • 693
  • 2
  • 11
  • 23

1 Answers1

2

Since nobody has answered, I thought I should just point out that you can create a standalone PHP script that checks for the existence of pcntl, then run that script with PHP CLI using, for example, exec or system.

Hubro
  • 56,214
  • 69
  • 228
  • 381