`
shake863
  • 浏览: 661411 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

【 转】pcntl.so install for system’s PHP install

 
阅读更多

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

MAMP PHP Template

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/

分享到:
评论

相关推荐

    php-7.0.27.tar.gz

    编译 ./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 --...

    php-5.6.29.tar.gz

    编译 ./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 --...

    php-7.3.0.tar.gz

    ./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=...

    php-7.2.20.tar.gz

    编译 ./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 --...

    php-7.3.7.tar.gz

    编译 ./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 --...

    php-7.1.29.tar.gz

    编译 ./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 --...

    php-7.2.26.tar.xz

    groupadd php-fpm && useradd -s /sbin/nologin -g php-fpm -M php-fpm 现在,我们使用 cd php-7.2.9 进入源码目录,上面都是开始编译前的必要设置,但是我们还有一步没有完成,就是生成编译配置(如果你很想知道...

    CentOS7下源码编译配置Apache2.4+MySQL5.6+PHP71

    ./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 ``` 根据需要调整配置,...

    编译安装lamp所需要的安装包

    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` - 初始...

    Centos LNMP安装.pdf

    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=...

    第52天:代码审计-PHP项目类RCE及文件包含下载删除1

    `path=/upload/../install/install.lock`可能表明文件删除操作不安全,可能允许攻击者删除关键文件。 案例分析中,`xhcms`的文件包含跨站漏洞展示了如何通过URL和应用功能寻找XSS和包含漏洞;`earmusic`的文件下载...

    Linux系统下多版本php共存的解决方案(超简单)

    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 ...

Global site tag (gtag.js) - Google Analytics