开发者

activate pcntl_fork() ubuntu xampp

I'm having some problems with the function pcntl_fork() in php.

I'm using XAMPP and I'm trying to use that function and keeps me showing this error:

Call to undefined function pcntl_fork()

I dig something on Google and in XAMPP forums but couldn't find anything totally useful. I found some forums saying that i need to enable some configuration called

--enable-pcntl

I saw the phpi开发者_如何学JAVAnfo() and i have that option in the configure command. Can you help me?

Thanks in adavnce,

Elkas


@Elkas, I don't know your XAMPP version, but XAMPP 1.8.0 on my computer is with pcntl extension. You can try command "/opt/lampp/bin/php -m | grep 'p' " to check the extension list of your php.


Note:

Currently, this module will not function on non-Unix platforms (Windows).

http://php.net/manual/en/pcntl.installation.php


It is configuration, but not runtime. It's compile time configuration. When compiling you have to do:

./configure --enable-pcntl
make
make install

If it's not compiled in you can't enable it without recompiling.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜