调用未定义功能pcntl_fork()Ubuntu的服务器阿帕奇 [英] Call to undefined function pcntl_fork() ubuntu server apache

查看:1674
本文介绍了调用未定义功能pcntl_fork()Ubuntu的服务器阿帕奇的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有pcnt_fork问题

我跟着这个教程安装

 的安装目录
PCNTL
$的mkdir / tmp目录/ phpsource
$ CD的/ tmp / phpsource
$ apt-get的源PHP5
$ CD的/ tmp / phpsource / PHP5 - * /转/ PCNTL
$运行phpize
$的./configure
$化妆
#那么你的模块复制到PHP5模块库路径(在我的情况:)
#并创建一个.ini文件,以使平滑重启后SAPI模块。$ CP /tmp/phpsource/php5-*/modules/pcntl.so / usr / lib目录/ PHP5 / 20090626 /
$回声延长= pcntl.so> /etc/php5/conf.d/pcntl.ini在php.ini文件,你需要
;该指令可以让你禁用某些功能,出于安全原因。
;它接受一个用逗号分隔的函数名列表。该指令
; *不*受安全模式是否打开或关闭。
; 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的致命错误:调用未定义的函数pcntl_fork()尚未!!


解决方案

  

这是不可能使用函数'pcntl_fork'被使用的PHP时
  作为Apache模块。您只能在CGI模式或从使用pcntl_fork
  命令行。


  
  

使用此功能将导致:致命错误:调用未定义
  功能:pcntl_fork()


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

I have a problem with pcnt_fork

I followed this tutorial for installation

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, 

but if I look into apache error log I have PHP Fatal error: Call to undefined function pcntl_fork() yet.!!

解决方案

It is not possible to use the function 'pcntl_fork' when PHP is used as Apache module. You can only use pcntl_fork in CGI mode or from command-line.

Using this function will result in: 'Fatal error: Call to undefined function: pcntl_fork()'

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

这篇关于调用未定义功能pcntl_fork()Ubuntu的服务器阿帕奇的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆