└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # php7-debian-build install php7 on debian wheezy 2 | ## Build php 7 3 | 4 | 5 | ###### Mostly for my own reference. Should work on a fresh Debian installation. 6 | ####### TODO: Install phpmyadmin 7 | 8 | add to /etc/apt/sources.list: 9 | ``` 10 | # Testing repository - main, contrib and non-free branches 11 | deb http://http.us.debian.org/debian testing main non-free contrib 12 | deb-src http://http.us.debian.org/debian testing main non-free contrib 13 | 14 | 15 | # Testing security updates repository 16 | deb http://security.debian.org/ testing/updates main contrib non-free 17 | deb-src http://security.debian.org/ testing/updates main contrib non-free 18 | 19 | 20 | # Unstable repo main, contrib and non-free branches, no security updates here 21 | deb http://http.us.debian.org/debian unstable main non-free contrib 22 | deb-src http://http.us.debian.org/debian unstable main non-free contrib 23 | ``` 24 | 25 | `apt-get update` 26 | 27 | `apt-get upgrade` 28 | 29 | `apt-get install apache2 apache2-mpm-event libapache2-mod-fcgid` 30 | 31 | `apt-get install apache2-dev libpcre3 libpcre3-dev autoconf` 32 | 33 | `apt-get install build-essential bison libbz2-dev libpng12-dev libfreetype6-dev libgmp3-dev libmcrypt-dev libmysqlclient-dev libpspell-dev librecode-dev libxml2-dev libt1-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libxpm-dev libmysqlclient-dev libpq-dev libicu-dev libfreetype6-dev libldap2-dev libxslt-dev openssl libcurl4-openssl-dev pkg-config git libtool` 34 | 35 | `apt-get install mysql-client mysql-server` 36 | 37 | 38 | 39 | 40 | `git clone https://github.com/php/php-src.git` 41 | 42 | add: 43 | 44 | `LC_ALL="en_GB.utf8"` 45 | 46 | to /etc/environment 47 | 48 | `cd php-src` 49 | 50 | `./buildconf` 51 | 52 | 53 | `./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --enable-mbstring --with-curl --with-openssl --with-xmlrpc --enable-soap --enable-zip --with-gd --with-jpeg-dir --with-png-dir --with-pgsql --enable-embedded-mysqli --with-freetype-dir --enable-intl --with-xsl --with-apxs2=/usr/bin/apxs2 --with-mysqli --with-pdo-mysql --enable-pdo=shared --with-pdo-mysql=shared --with-pdo-sqlite=shared ` 54 | 55 | 56 | `make` 57 | 58 | `make install` 59 | 60 | `ln -sf /usr/local/php/bin/php /usr/bin/php` 61 | 62 | add to /etc/apache2/sites-enabled/000-default.conf or other vhost conf file: 63 | 64 | `AddType application/x-httpd-php .php .phtml` 65 | 66 | `php -v` 67 | 68 | ``` 69 | PHP 7.0.0-dev (cli) (built: Mar 30 2015 11:23:52) 70 | Copyright (c) 1997-2015 The PHP Group 71 | Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies 72 | ``` 73 | 74 | add to /usr/local/php/lib 75 | ``` 76 | extension=pdo.so 77 | extension=pdo_mysql.so 78 | ``` 79 | 80 | mysql will now work, but I was not able to get it to work with 'localhost'. I had to bind mysql to * and use the direct server IP. 81 | --------------------------------------------------------------------------------