Install php53 to php52 in parallel » History » Revision 15
« Previous |
Revision 15/40
(diff)
| Next »
Andreas Kohlbecker, 11/22/2011 02:48 PM
How to install php5.3 to php5.2 in parallel¶
This instructions are specific to Debian Linux and derivatives like Ubuntu.
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
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 · 15 revisions