-
-
Save curder/2aa06457692b5cb4b3d9100680f94264 to your computer and use it in GitHub Desktop.
Build PCNTL ext for MAMP PHP 7.2.10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first of all check extension exists | |
php -m |grep pcntl | |
# Command lines tools | |
xcode-select --install | |
# Install dependencies | |
brew install wget autoconf openssl libjpeg libpng lzlib curl imap-uw readline postgresql libxml2 mcrypt gettext libxslt libiconv icu4c expat bison webp freetype | |
# Dirs | |
mkdir -p /Applications/MAMP/bin/php/php7.2.10/include | |
cd /Applications/MAMP/bin/php/php7.2.10/include | |
# Download PHP 7.2.10 sources | |
wget http://fr2.php.net/get/php-7.2.10.tar.bz2/from/this/mirror -O php-7.2.10.tar.bz2 | |
# Extract | |
tar -xjvf php-7.2.10.tar.bz2 | |
mv php-7.2.10 php | |
# Configure PHP | |
cd /Applications/MAMP/bin/php/php7.2.10/include/php/php-7.2.10 | |
./configure --with-gd=shared --with-jpeg-dir=/usr/local/opt/jpeg --with-png-dir=/usr/local/opt/libpng --with-zlib --with-zlib-dir=/usr/local/opt/lzlib --with-freetype-dir=/usr/local/opt/freetype --prefix=/Applications/MAMP/bin/php/php7.2.10 --exec-prefix=/Applications/MAMP/bin/php/php7.2.10 --sysconfdir=/Applications/MAMP/bin/php/php7.2.10/conf --with-config-file-path=/Applications/MAMP/bin/php/php7.2.10/conf --enable-ftp --enable-gd-native-ttf --with-bz2=/usr --with-ldap --with-mysqli=mysqlnd --enable-mbstring=all --with-curl=/usr/local/opt/curl --enable-sockets --enable-bcmath --with-imap=shared,/usr/local/opt/imap-uw --enable-soap --with-kerberos --enable-calendar --with-pgsql=shared,/usr/local/opt/postgresql --enable-exif --with-libxml-dir=/usr/local/opt/libxml2 --with-gettext=shared,/usr/local/opt/gettext --with-xsl=/usr/local/opt/libxslt --with-pdo-mysql=mysqlnd --with-pdo-pgsql=shared,/usr/local/opt/postgresql --with-mcrypt=shared,/usr/local/opt/mcrypt --with-openssl=/usr/local/opt/openssl --enable-zip --with-iconv=/usr/local/opt/libiconv --enable-opcache --enable-intl --with-tidy=shared --with-icu-dir=/usr/local/opt/icu4c --enable-wddx --with-libexpat-dir=/usr/local/opt/expat --with-readline=/usr/local/opt/readline --with-mhash YACC=/usr/local/opt/bison/bin/bison --with-webp-dir=/usr/local/opt/webp | |
# Add MAMP's PHP binaries to PATH | |
export PATH=/Applications/MAMP/bin/php/php7.2.10/bin/:$PATH | |
# Phpize | |
cd /Applications/MAMP/bin/php/php7.2.10/include/php/php-7.2.10/ext/pcntl | |
phpize | |
# Build | |
./configure | |
make | |
# Install ext | |
cp modules/pcntl.so /Applications/MAMP/bin/php/php7.2.10/lib/php/extensions/no-debug-non-zts-20170718/ | |
echo "extension=pcntl.so" >> /Applications/MAMP/bin/php/php7.2.10/conf/php.ini | |
# check extension exists | |
php -m |grep pcntl | |
# It's OK. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment