Skip to content

Instantly share code, notes, and snippets.

@arevindh
Last active August 20, 2016 00:13
Show Gist options
  • Save arevindh/0b559af4eaaa35fd2fcd636365ce2fc9 to your computer and use it in GitHub Desktop.
Save arevindh/0b559af4eaaa35fd2fcd636365ce2fc9 to your computer and use it in GitHub Desktop.
Install php 7 threadsafe with apache
source : https://www.linkedin.com/pulse/how-install-pthreads-php-sanjog-kumar-dash
http://www.tecmint.com/install-and-compile-php-7-on-centos-7-and-debian-8/
1. Obtain the Apache HTTP server from The Apache HTTP Server Project, and unpack it:
install apache2 using apt-get
3. Set Document root in /usr/local/apache2/conf/httpd.conf ( Check your apache binary path. Default document root is /usr/local/apache2/htdocs
4. For Php Code parsing copy and paste below code to /usr/local/apache2/conf/httpd.conf bottom
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
Install PHP
wget http://in1.php.net/get/php-7.0.10.tar.gz/from/this/mirror
tar jxf php-7.0.10.tar.gz
cd php-7.0.10/
(cd ext && git clone git://github.com/krakjoe/pthreads.git)
./buildconf --force
./configure \
--prefix=/usr \
--with-config-file-path=/etc \
--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-mcrypt \
--with-iconv \
--with-gmp \
--with-pspell \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-openssl \
--with-pdo-mysql=/usr \
--with-gettext=/usr \
--with-zlib=/usr \
--with-bz2=/usr \
--with-recode=/usr \
--with-mysqli=/usr/bin/mysql_config \
--enable-debug \
--enable-maintainer-zts \
--enable-pthreads \
--with-apxs2
make
#make test
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment