PHP-5.3 build with tls 1.2 support

I know, last release of php-5.3 was the 14th August 2014. Don't blame me! Why are you here anyway? Lets build php for our client's old php application.

We just need to download the latest openssl version that python 5.3 won't refuse to compile and compile curl and our old php.

openssl-1.0.1u.tar.gz

curl -O 'https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz'
tar -xvzf openssl-1.0.1u.tar.gz
cd openssl-1.0.1u
./config --prefix=/usr/local --openssldir=/usr/local/openssl
make
make install

curl-7.64.1.tar.gz
It's important to build a curl using the same openssl version than php

curl -O 'https://curl.se/download/curl-7.64.1.tar.gz'
tar -xvzf curl-7.64.1.tar.gz
cd curl-7.64.1
./configure --prefix=/usr/local --with-ssl=/usr/local/openssl
make
make install

php-5.3.29.tar.bz2

Then compile your legacy php. Don't forget to add your own config options to enable mysql, imagemagick and so. Your distro's packages should be enough to fulfill those requirements.

curl -O 'https://www.php.net/distributions/php-5.3.29.tar.bz2'
tar -xvjf php-5.3.29.tar.bz2
cd php-5.3.29
/configure '--with-openssl' '--with-openssl-dir=/usr/local/openssl' '--with-curl=/usr/local/lib'
make
make install

Now we're ready to serve our client's old and buggy apps.

© 2019 Joan Pérez i Cauhé. All rights reserved.