Install php53 to php52 in parallel ubuntu-1110 » History » Revision 3
« Previous |
Revision 3/7
(diff)
| Next »
Andreas Kohlbecker, 05/02/2012 06:02 PM
How to install php5.3 to php5.2 in parallel in Ubuntu 11.10¶
This instructions are specific to Debian Linux and derivatives like Ubuntu up to the version 11.10 of Ubuntu. For more recent versions of Ubuntu please refer to Install php5.3 to php5.2 in parallel
In the following you will find a brief description on how to compile and install php 5.3 from source. In order to install both versions in parallel you still will need to pin down your php to version 5.2 though.
see also:
http://bernhardhaeussner.de/blog/89_Howto:_PHP5.3_parallel_zu_PHP5_installieren
http://artur.ejsmont.org/blog/content/compiling-and-building-php-53-on-ubuntu
Install additional packages¶
apt-get install bison re2c libmysqlclient-dev libbz2-dev bzip2 libxslt1.1 libxslt1-dev libxml2 libxml2-dev libjpeg62-dev libpng12-dev libxpm-dev
You may need more package if you are not having apache2, mysql, gcc and linux sources.
Check symlinks in /usr/lib (Ubunbtu only)¶
Check if the below symlinks exist in @/usr/lib@, if nor create them!:
ln -s x86_64-linux-gnu/libjpeg.a libjpeg.a ln -s x86_64-linux-gnu/libjpeg.so libjpeg.so ln -s x86_64-linux-gnu/libpng.a libpng.a ln -s x86_64-linux-gnu/libpng.so libpng.so
Download and extract php source¶
download http://php.net/downloads.php
extract
cd into the extracted folder
Run the configure command¶
_This configuration is based on based on pkg-php/php.git/debian/rules":http://anonscm.debian.org/gitweb/?p=pkg-php/php.git;a=blob_plain;f=debian/rules;hb=HEAD._ The php5.2 rules are found "here
Run the configure command below inside the extracted php source folder.
./configure \ --prefix=/usr/share/php53 \ --datadir=/usr/share/php53 \ --bindir=/usr/bin/php53 \ --with-config-file-path=/etc/php53/apache2 \ --with-config-file-scan-dir=/etc/php53/apache2/conf.d \ --sysconfdir=/etc/php53/apache2 \ --with-layout=GNU \ --enable-mbstring \ --with-mysql=/usr \ --with-pdo-mysql \ --with-mhash \ --with-curl \ --enable-soap \ --enable-zip \ --with-gettext \ --with-xsl=/usr \ --with-libxml-dir=/usr \ --with-gd \ --with-jpeg-dir=/usr \ --with-xpm-dir=/usr/X11R6 \ --with-png-dir=/usr \
./configure is reporting errors:
I you are getting an error like
configure: error: xxxx not found. Please check your XXXX installation.
Check if you have installed the xxx package and also the according development package.You can debug your the configuration by searching for the line of code in
./configure
wich is producing the error message and add the following code snipped before the lines found:
###DEBUG set -x
Execute the configure command again an see the detailed output.
Build and install¶
make # optional, dauert, findet aber Fehler: make test # bringt die Dateien an ihren Platz: sudo make install > php53-install.log
You can review php53-install.log.
Configure Apache¶
This was the tricky part!
Now please follow the instruction on: http://bernhardhaeussner.de/blog/89_Howto:_PHP5.3_parallel_zu_PHP5_installieren
Updated by Andreas Kohlbecker over 12 years ago · 3 revisions