Comments on Building PHP 5.4 From Source On Debian Squeeze
Building PHP 5.4 From Source On Debian Squeeze This tutorial describes how you can build PHP 5.4 from source on Debian Squeeze. Later on, we will install more modules through PECL and add it as an additional PHP version to ISPConfig's dropdown. At the end you will have a fully function PHP 5.4 installation which is selectable within the ISPConfig interface and a .deb package than can be used on other server as well.
5 Comment(s)
Comments
You can install php5.4 from dotdeb repo http://www.dotdeb.org/
And this is the direct-Link to howto: http://www.dotdeb.org/instructions/
Great article. I got it working on armel architecture, which is NOT available on dotdeb site. Unfortunately, there is missing instructions about building the libapache2-mod-php5, php5-cli, and php5-common modules required for apache integration.
Great, I made it work with 5.4.17, armel architecture.
But for Apache integration, you must add
--with-apx2=/usr/bin/apxs2 \
./configure \
--prefix=/opt/php/5.4.17 \
--disable-rpath \
--enable-bcmath \
--enable-calendar \
--enable-cgi \
--enable-dba \
--enable-exif \
--enable-ftp \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-intl \
--enable-mbregex \
--enable-mbstring \
--enable-pcntl \
--enable-shmop \
--enable-soap \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--enable-zip \
--with-apxs2=/usr/bin/apxs2 \
--with-bz2 \
--with-curl \
--with-curlwrappers \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-jpeg-dir=/usr \
--with-kerberos \
--with-libdir=lib64 \
--with-libxml-dir=/usr \
--with-mcrypt \
--with-mhash \
--with-mysql \
--with-mysqli \
--with-openssl \
--with-pcre-regex \
--with-pdo-mysql \
--with-pear \
--with-png-dir=/usr \
--with-pspell \
--with-xsl \
--with-xmlrpc \
--with-zlib \
--with-zlib \
--with-zlib-dir
This howto does not seem to work on current squeeze-lts.
For me the apt-get build-dep php5 throws lots of conflicts and configure fails.
I did the following to make it work:
apt-get install -y libpcre3-dev libpcre++-dev libpng12-dev libbz2-dev libcurl4-openssl-dev libc-client2007e-dev libjpeg-dev libgif-dev libgif4 libpthread-stubs0 libpthread-stubs0-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev libxpm-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev xtrans-dev libxml2-dev libmysqlclient-dev libfreetype6-dev libmcrypt-dev libicu-dev libpspell-dev
The libdir also changed so the altered configure statement is
./configure --prefix=/opt/php/5.4.12 --with-zlib-dir --with-freetype-dir --enable-cgi --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-libdir=lib/x86_64-linux-gnu --with-libxml-dir=/usr --enable-exif --enable-dba --with-gettext --enable-shmop --enable-sysvmsg --enable-wddx --with-imap --with-imap-ssl --with-kerberos --enable-bcmath --enable-ftp --enable-intl --with-pspell