Skip to content

Instantly share code, notes, and snippets.

@jbanety
Last active March 13, 2019 04:23
Show Gist options
  • Save jbanety/998a9e6d631d6ebbcba42b2a80498cda to your computer and use it in GitHub Desktop.
Save jbanety/998a9e6d631d6ebbcba42b2a80498cda to your computer and use it in GitHub Desktop.
Upgrade MAMP PHP to 7.0.6 with Homebrew formulas
# Brew Formulas
brew update
brew install libpng jpeg lzlib freetype readline openssl imap-uw curl postgresql libxml2 gettext libxslt mcrypt homebrew/dupes/libiconv icu4c expat
# MAMP
mkdir -p /Applications/MAMP/bin/php/php7.0.6/include
cd /Applications/MAMP/bin/php/php7.0.6/include
# Download PHP
wget -O php-7.0.6.tar.bz2 http://fr2.php.net/get/php-7.0.6.tar.bz2/from/this/mirror
# Untar
tar -xjvf php-7.0.6.tar.bz2
# Open
mv php-7.0.6 php
cd php
# Configure
./configure \
--prefix=/Applications/MAMP/bin/php/php7.0.6 \
--exec-prefix=/Applications/MAMP/bin/php/php7.0.6 \
--sysconfdir=/Applications/MAMP/bin/php/php7.0.6/conf \
--libexecdir=/Applications/MAMP/bin/php/php7.0.6/modules \
--with-config-file-path=/Applications/MAMP/bin/php/php7.0.6/conf \
--enable-ftp \
--enable-gd-native-ttf \
--enable-mbstring=all \
--enable-sockets \
--enable-bcmath \
--enable-soap \
--enable-calendar \
--enable-exif \
--enable-zip \
--enable-opcache \
--enable-cgi \
--enable-intl \
--enable-pcntl \
--enable-wddx \
--with-apxs2 \
--with-gd \
--with-jpeg-dir=/usr/local/opt/jpeg \
--with-png-dir=/usr/local/opt/libpng \
--with-zlib \
--with-zlib-dir=/usr/local/opt/zlib \
--with-freetype-dir=/usr/local/opt/freetype \
--with-bz2=/usr \
--with-ldap \
--with-mysqli=mysqlnd \
--with-curl=/usr/local/opt/curl \
--with-imap=shared,/usr/local/opt/imap-uw/2007f \
--with-kerberos \
--with-pgsql=shared,/usr/local/opt/postgresql \
--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-mcrypt=shared,/usr/local/opt/mcrypt \
--with-openssl=shared,/usr/local/opt/openssl \
--with-iconv=/usr/local/opt/libiconv \
--with-tidy=shared \
--with-icu-dir=/usr/local/opt/icu4c \
--with-libexpat-dir=/usr/local/opt/expat \
--with-readline=shared,/usr/local/opt/readline
# Make
make
# Install
make install
@djes240285
Copy link

Hello,
Tell me how to configure after shell script?
That does not change for MAMP. Added new folder in MAMP/bin/php/php7.0.6/
In this folder : include/php
What I need next?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment