0

pcnt_fork に問題があります

このチュートリアルに従ってインストールしました

instalation of 
pcntl
$ 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/pcntl.so /usr/lib/php5/20090626/
$ echo "extension=pcntl.so" > /etc/php5/conf.d/pcntl.ini

on php.ini you need to 
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://php.net/disable-functions
;disable_functions pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, 

しかし、Apache エラー ログを調べると、PHP Fatal error: Call to undefined function pcntl_fork() yet.!! があります。

4

1 に答える 1

1

PHP を Apache モジュールとして使用する場合、関数 'pcntl_fork' を使用することはできません。pcntl_fork は、CGI モードまたはコマンドラインからのみ使用できます。

この関数を使用すると、「致命的なエラー: 未定義の関数への呼び出し: pcntl_fork()」という結果になります。

http://php.net/manual/en/function.pcntl-fork.php

于 2014-09-17T13:41:27.280 に答える