-
-
Save ediamin/0141a1f44e2cfd2d91a3794b7f9df07d to your computer and use it in GitHub Desktop.
Build PCNTL ext for MAMP PHP 7.1.1
This file contains hidden or 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
# 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 homebrew/dupes/libiconv icu4c expat bison webp freetype | |
# Dirs | |
mkdir -p /Applications/MAMP/bin/php/php7.1.1/include | |
cd /Applications/MAMP/bin/php/php7.1.1/include | |
# Download PHP 7.1.1 sources | |
wget http://fr2.php.net/get/php-7.1.1.tar.bz2/from/this/mirror -O php-7.1.1.tar.bz2 | |
# Extract | |
tar -xjvf php-7.1.1.tar.bz2 | |
mv php-7.1.1 php | |
# Configure PHP | |
cd /Applications/MAMP/bin/php/php7.1.1/include/php/php-7.1.1 | |
./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.1.1 --exec-prefix=/Applications/MAMP/bin/php/php7.1.1 --sysconfdir=/Applications/MAMP/bin/php/php7.1.1/conf --with-config-file-path=/Applications/MAMP/bin/php/php7.1.1/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.1.1/bin/:$PATH | |
# Phpize | |
cd /Applications/MAMP/bin/php/php7.1.1/include/php/php-7.1.1/ext/pcntl | |
phpize | |
# Build | |
./configure | |
make | |
# Install ext | |
cp modules/pcntl.so /Applications/MAMP/bin/php/php7.1.1/lib/php/extensions/no-debug-non-zts-20160303/ | |
echo "extension=pcntl.so" >> /Applications/MAMP/bin/php/php7.1.1/conf/php.ini |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment