Skip to content

Instantly share code, notes, and snippets.

@sophiaphillipa
Last active April 27, 2016 19:32
Show Gist options
  • Save sophiaphillipa/c0f2537481b6064b8db4e2f8abda939f to your computer and use it in GitHub Desktop.
Save sophiaphillipa/c0f2537481b6064b8db4e2f8abda939f to your computer and use it in GitHub Desktop.
Compile php
-- Downloading and compile - just php-fpm be sure to not use: --with-apxs2=/usr/sbin/apxs as this would replace apache php
wget http://am1.php.net/get/php-5.6.18.tar.gz/from/this/mirror
tar -xzf php-5.6.18.tar.gz
cd php-5.6.18
./configure --prefix=/usr/php/5.6.18 --exec-prefix=/usr/php/5.6.18/exec --sysconfdir=/etc/php56 --localstatedir=/var --datadir=/usr/share/php --mandir=/usr/share/man --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --with-config-file-path=/etc/php56 --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-gdbm --with-gmp --enable-ftp --with-gettext --enable-mbstring --with-readline --with-mysql --enable-pdo --with-pdo-mysql=mysqlnd --with-mysql-sock=/var/lib/mysql/mysql.sock
make
make install
-- Address to treat errors:
http://crybit.com/20-common-php-compilation-errors-and-fix-unix/
-- Important to know:
As we told that exce-prefix will be /usr/php/5.6.18/exec, php-fpm will be inside there.
So we should work with this php-fpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment