即使在编译后,在 php 中也没有启用 PCNTL


PCNTL not enabled in php even after compiling

我刚刚用--enable-pcntl编译了我的PHP,但是当我尝试访问PHP中的进程控制函数时,我得到:

Fatal error: Call to undefined function pcntl_fork()

我错过了什么吗?我的 apache 不是用 prefork 编译的。这是工作所必需的吗?

完整的 PHP 编译标志:

'./configure' 
'--prefix=/usr/local/lib64/php' 
'--with-libdir=lib64' 
'--with-apxs2=/usr/local/lib64/apache2/bin/apxs' 
'--with-mysql' 
'--enable-xml' 
'--with-curl' 
'--with-gd' 
'--enable-soap' 
'--with-xmlrpc' 
'--with-mysqli' 
'--with-unixODBC=/usr/' 
'--with-pdo-mysql' 
'--with-oci8=shared,instantclient,/usr/lib/oracle/11.2/client64/lib' 
'--with-mcrypt' 
'--enable-mbstring' 
'--with-zlib=/usr' 
'--with-openssl' 
'--enable-sockets' 
'--with-mssql=/usr/local' 
'--enable-ftp' 
'--enable-zip' 
'--enable-pcntl' 

阿帕奇模块:

core mod_so http_core event mod_authn_file mod_authn_core mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_core mod_access_compat mod_auth_basic mod_reqtimeout mod_filter mod_mime mod_log_config mod_env mod_headers mod_setenvif mod_version mod_unixd mod_dav mod_status mod_autoindex mod_dav_fs mod_dir mod_alias mod_rewrite mod_php5 

编辑:也许我不够清楚。我不会从网络服务器使用 pcntl 功能。我想重申一下,我的 pcntl 函数也没有从命令行工作。对此有什么想法吗?

确保你没有多个 PHP 副本,因为它们可以用不同的方式配置。