下載wget http://hk1.php.net/get/php-5.5.10.tar.gz/from/this/mirror
解壓tar -zxvf mirror
接着進入 cd php-5.5.10/ext/pcntl/
四、接着運行 /phpstudy/server/php/bin/phpize
五、執行./configure --with-php-config=PHP配置文件路徑
./configure --with-php-config=/phpstudy/server/php/bin/php-config
六、編譯、安裝 make && make install 如果/ext/pcntl/modules/pcntl.so 生成了,編譯成功
七、將php加載的PHP.INI里面增加擴展 echo "extension=pcntl.so" >> /etc/php.in
附:如果沒有看到下圖的pcntl界面 進入配置文件指明pcntl完整路徑/phpstudy/server/php/etc/php.ini (我的pcntl完整路徑如下) 加上下方的兩個
八、 phpstudy restart