How-to: build PHP 5.3/5.4/5.5 on Debian9/10/CentOS8

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,340
Location
LT, EU
Newer OS versions run OpenSSL 1.1, which is not compatible with PHP 5.3/5.4/5.5. If you'd like to 'workaround it' (not recommended), you can use this for php-fpm type of PHP, example is for PHP 5.3:
Code:
cd /usr/local/directadmin/custombuild
mkdir -p custom/fpm
cp -p configure/fpm/configure.php53 custom/fpm/configure.php53
touch custom/fpm/.custom_openssl
perl -pi -e 's|with-openssl|with-openssl=/usr/local/lib_http2|g' custom/fpm/configure.php53
wget ftp://ftp.openssl.org/source/openssl-1.0.2s.tar.gz
tar xzf openssl-1.0.2s.tar.gz
cd openssl-1.0.2s
./config --prefix=/usr/local/lib_http2 no-ssl2 no-ssl3 zlib-dynamic -fPIC
make depend
make install
./build php_expert 5.3 php-fpm
./build rewrite_confs
 

zEitEr

Super Moderator
Joined
Apr 11, 2005
Messages
13,889
Location
GMT +7.00
Hello Martynas,

Thank you for the guide. Why do we need to

Code:
touch custom/fpm/.custom_openssl
?

I don't find any related line in 2.0.0 (rev: 2146).
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,340
Location
LT, EU
Hello Martynas,

Thank you for the guide. Why do we need to

Code:
touch custom/fpm/.custom_openssl
?

I don't find any related line in 2.0.0 (rev: 2146).
Avail in 2147 only, just to skip “exiting” the script with an error that openssl 1.1 is incompatible with PHP <5.6 :)
 

wattie

Verified User
Joined
May 31, 2008
Messages
994
Location
Bulgaria
One more thing - as far as I know if you build your OpenSSL with "no-ssl3", PHP 5.5 and lower will NOT compile with it.
 
Top