Страница 1 из 1

php не видит pcntl_fork()

Добавлено: 2010-07-26 21:33:35
ProFTP

Код: Выделить всё

<?php

$pid = pcntl_fork();
if ($pid == -1) {
     die('could not fork');
} else if ($pid) {
     // we are the parent
     pcntl_wait($status); //Protect against Zombie children
} else {
     // we are the child
}

?>
мне отвичает на строку $pid = pcntl_fork();

Код: Выделить всё

Fatal error: Call to undefined function pcntl_fork() in .../index.php on line 198
почему так?


в phpinfo():
вродебы есть форк prefork

Код: Выделить всё

Loaded Modules 	core mod_authn_file mod_authz_host mod_authz_groupfile mod_authz_user mod_authz_default mod_auth_basic mod_include mod_filter mod_deflate mod_log_config mod_logio mod_env mod_expires mod_headers mod_unique_id mod_setenvif mod_proxy mod_proxy_connect mod_proxy_ftp mod_proxy_http mod_proxy_scgi mod_proxy_ajp mod_proxy_balancer mod_ssl prefork http_core mod_mime mod_dav mod_status mod_autoindex mod_asis mod_info mod_suexec mod_cgi mod_dav_fs mod_negotiation mod_dir mod_actions mod_userdir mod_alias mod_rewrite mod_so mod_auth_passthrough mod_bwlimited mod_fpcgid mod_bw mod_disable_suexec mod_php5 

как включить чтобы он видел pcntl_fork()?

Re: php не видит pcntl_fork()

Добавлено: 2010-07-27 11:29:27
ProFTP
это на хостинге...

проблема может быть: сборка была без форка или хостинг на винде

Re: php не видит pcntl_fork()

Добавлено: 2010-07-29 19:02:07
zg