D
D
Danila2016-09-25 10:49:10
PHP
Danila, 2016-09-25 10:49:10

How to install PHP 5.3 on Debian 8.5?

Hello! Already asked a question about compiling PHP 5.3. The following question arose:
I realized that I can’t build PHP 5.3 normally, tell me where can I get already compiled PHP 5.3 sources? (it's important that they have --prefix=/opt/php53
when compiling . Thanks in advance for your replies.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
shagguboy, 2016-09-25
@shagguboy

https://rusadmin.biz/web-server/ustanovka-php-5-3-...

S
ShamblerR, 2019-03-12
@ShamblerR

debian 9, maybe it will be useful for someone

apt-get update
apt-get install -y libfcgi-dev libfcgi0ldbl libjpeg62-dbg libmcrypt-dev libssl-dev libxml2-dev zlib1g-dev libcurl4-gnutls-dev libjpeg-turbo8-dev libbz2-dev libjpeg-dev libfreetype6-dev libmcrypt-dev libcurl4-gnutls-dev
ln -s /usr/include/x86_64-linux-gnu/curl curl

cd /usr/local/include
mkdir /opt/php-5.4.45
mkdir /usr/local/src/php5
cd /usr/local/src/php5
wget http://de2.php.net/get/php-5.4.45.tar.gz/from/this/mirror
mv mirror php-5.4.45.tar.gz
tar -xzvf php-5.4.45.tar.gz
cd php-5.4.45
./configure --prefix=/opt/php-5.4.45 --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --enable-mbstring --enable-sockets --enable-exif --enable-bcmath --enable-calendar --enable-zip --enable-ftp --enable-gd-native-ttf --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir --with-zlib --with-zlib-dir --with-bz2 --with-mcrypt --with-mhash --with-pcre-regex --with-libxml-dir=/usr --with-xmlrpc --with-xsl --with-mysql --with-libdir=/lib/x86_64-linux-gnu --with-curl
make
make install

/opt/php-5.4.45/bin/php -v
PHP 5.4.45 (cli) (built: Mar 12 2019 20:05:50)
Copyright (c) 1997-2014 The PHP Group

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question