Skip to content

Instantly share code, notes, and snippets.

@igorgolovanov
Forked from denji/readme-php7.md
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igorgolovanov/769fcf1596b0f354c9c2 to your computer and use it in GitHub Desktop.
Save igorgolovanov/769fcf1596b0f354c9c2 to your computer and use it in GitHub Desktop.

Quick install PHP 7.0 (phpng):

1. Install depends PHP 7.0 (phpng)
$ brew install autoconf automake bison27 gd freetype t1lib mariadb gettext zlib mcrypt
Add support for Bison 3.x

curl -L https://github.com/php/php-src/pull/685.diff | patch -p1

2. Configure PHP 7.0 (phpng)
$ git clone https://github.com/php/php-src.git
$ cd php-src
$ ./buildconf
$ curl -sL https://gist.github.com/denji/8e50fcb13482c5d6c78a/raw/configure.bash | bash -s
$ make -j`sysctl -n hw.logicalcpu_max`
$ open -R .

Deploy OSX package (First step 2 finish)

$ env INSTALL_ROOT=$PWD/phpng-pkg make install
$ pkgbuild \
  --root phpng-pkg \
  --identifier org.denji.phpng \
  --version 7.0.0-dev \
  --ownership recommended \
  PHPng-7.0.0-dev.pkg
$ open -R PHPng-7.0.0-dev.pkg

Install PHP 7.0 (phpng) to /usr/local/opt/phpng

$ make install

Uninstall PHP 7.0 (phpng)

$ rm -rvf "/usr/local/opt/phpng"
$ rm -rvf "/usr/local/etc/phpng"

TODO

  1. export php.ini-{development,production}, php-fpm.ini, extensions ini, php.ini, fpm srcipt launchd in /usr/local/etc/phpng/

Links

2014-09-26 10 36 56

# configure phpng
env YACC=`brew --prefix bison27`/bin/bison ./configure \
--prefix="/usr/local/opt/phpng" \
--with-config-file-path="/usr/local/etc/phpng" \
--enable-mbstring \
--enable-zip \
--enable-bcmath \
--enable-pcntl \
--enable-ftp \
--enable-exif \
--enable-calendar \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-curl \
--with-iconv \
--with-gmp \
--with-gd \
--with-jpeg-dir=`brew --prefix gd` \
--with-png-dir=`brew --prefix gd` \
--with-freetype-dir=`brew --prefix freetype` \
--with-t1lib=`brew --prefix t1lib` \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-openssl \
--with-mysql=`brew --prefix mariadb` \
--with-pdo-mysql=`brew --prefix mariadb` \
--with-gettext=`brew --prefix gettext` \
--with-zlib=`brew --prefix zlib` \
--with-bz2 \
--with-mysqli=`brew --prefix`/bin/mysql_config \
--with-mcrypt=`brew --prefix mcrypt`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment