PHP PCNTL in Debian/Ubuntu PHP-installation

PHP Process Control

Process Control support in PHP implements the Unix style of process creation, program execution, signal handling and process termination.
Check the complete introduction over Process Control.

howto enable the PHP Process Control in a standard PHP installation on Debian/Ubuntu.

$ mkdir /tmp/phpsource
$ cd /tmp/phpsource
$ apt-get source php5
$ cd /tmp/phpsource/php5-*/ext/pcntl
$ phpize
$ ./configure
$ make

# then copy your module to php5 module-lib path (in my case:)
# and create an .ini-file to enable the module for sapi after graceful restart.

$ cp /tmp/phpsource/php5-*/modules/ /usr/lib/php5/20090626/
$ echo "" > /etc/php5/conf.d/pcntl.ini

PHP5 session_start failed, opendir permission denied.

Today i got the PHP Error:
“session_start() [function.session-start]: ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in …”.

reproduce bug:


Continue reading “PHP5 session_start failed, opendir permission denied.”