pcntl.so install for system’s PHP install
Recently I needed to use pcntl_fork with a project and found that the stack I was using (MAMP) didn’t include support for pcntl.so by default. Fortunately it’s pretty easy to install on Lion.
Download the appropriate PHP source code from here. Since I’m using MAMP 2.0.5 and it comes with PHP 5.3.6, I had to go to the old releases page here.
curl http://museum.php.net/php5/php-5.3.6.tar.gz > php-5.3.6.tar.gz
tar xvfz php-5.3.6.tar.gz
cd php-5.3.6/ext/pcntl
Now for the build:
phpize
./configure
make
sudo make install
Now we need to add the pcntl.so to the php.ini …so open /private/etc/php.ini with your favorite editor and add the following line:
extension=pcntl.so
After saving, run the following command and it should output ‘pcntl’:
php -m | grep pcntl
Optional MAMP install:
Now lets copy pcntl.so to the MAMP extension folder:
cp /usr/lib/php/extensions/no-debug-non-zts-20090626/pcntl.so /Applications/MAMP//bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/
Edit the php.ini template for MAMP’s PHP install and add:
extension=pcntl.so
Restart MAMP… pcntl extension should now be installed for the system’s PHP and MAMP’s PHP.
Output of phpinfo(); will show this:
http://cyberpunx.com/2011/11/pcntl-so-on-osx-lion-and-mamp/
分享到:
相关推荐
编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...
编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...
./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --mandir=...
编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...
编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...
编译 ./configure --prefix=/usr/local/php --exec-prefix=/usr/local/php --bindir=/usr/local/php/bin --sbindir=/usr/local/php/sbin --includedir=/usr/local/php/include --libdir=/usr/local/php/lib/php --...
groupadd php-fpm && useradd -s /sbin/nologin -g php-fpm -M php-fpm 现在,我们使用 cd php-7.2.9 进入源码目录,上面都是开始编译前的必要设置,但是我们还有一步没有完成,就是生成编译配置(如果你很想知道...
./configure --prefix=/usr/local/apache2 --enable-so --enable-rewrite --with-included-apr make && make install ``` 3. 配置Apache: ```bash vim /usr/local/apache2/conf/httpd.conf ``` 根据需要调整配置,...
ci -DENABLED_LOCAL_INFILE=1 -DWITH_EDITLINE=system -DWITH_ZLIB=system -DWITH_BZ2LIB=system -DWITH_READLINE=system -DCMAKE_BUILD_TYPE=RelWithDebInfo` - 编译和安装:`make && sudo make install` - 初始...
DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_EMBEDDED_SERVER=1 -DWITH_DEBUG=0 -DEXTRA_CHARSETS=all -DENABLED_LOCAL_INFILE=1 -DWITH_SSL=yes -DWITH_ZLIB=system -DWITH_READLINE=...
`path=/upload/../install/install.lock`可能表明文件删除操作不安全,可能允许攻击者删除关键文件。 案例分析中,`xhcms`的文件包含跨站漏洞展示了如何通过URL和应用功能寻找XSS和包含漏洞;`earmusic`的文件下载...
disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server ...