Hello everyone, I'm looking at running PHP 5.6 for legacy reasons in addition to version 7.0 currently as default. My server is running on Debian 9 (Stretch) with ISPConfig 3.1.7. At this point if I understand well, this is still somewhat tricky due to compatibility issues so I could use your guidance. Here's where I'm at: mkdir /opt/php-5.6.31 mkdir /usr/local/src/php5-build cd /usr/local/src/php5-build wget http://fr2.php.net/get/php-5.6.31.tar.bz2/from/this/mirror -O php-5.6.31.tar.bz2 tar jxf php-5.6.31.tar.bz2 cd php-5.6.31/ apt-get install build-essential apt-get build-dep php7.0 (build-dep php5 does not work) apt-get install libfcgi-dev libfcgi0ldbl libjpeg-dev libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng-dev libfreetype6-dev libkrb5-dev libpq-dev libxml2-dev libxslt1-dev cd /usr/include ln -s x86_64-linux-gnu/curl (needed to avoid curl not being found later) ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.agit cd /usr/local/src/php5-build/php-5.6.31 ./configure --prefix=/opt/php-5.6.31 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysql --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap --with-imap-ssl --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm. make And that's where the process stops by spewing a long list of errors with Openssl, such as: Code: Makefile:635: recipe for target 'ext/openssl/openssl.lo' failed make: *** [ext/openssl/openssl.lo] Error 1 ... with many other errors all referring to Openssl. Please let me know if you have a solution to get PHP 5.6 properly running on Debian 9. Thanks in advance for your help!
php 5.6 doesn't build with openssl 1.1 without patching it. Check here: https://bugs.php.net/patch-display.php?bug_id=72360&patch=openssl&revision=latest
Thank you, HSorgYves. Apparently I was able to patch it properly and move on. Now "make" is blocking on the following: Code: [...] -I/usr/include -g -O2 -fvisibility=hidden -c /usr/local/src/php5-build/php-5.6.31/ext/phar/util.c -o ext/phar/util.lo /usr/local/src/php5-build/php-5.6.31/ext/phar/util.c: In function ‘phar_verify_signature’: /usr/local/src/php5-build/php-5.6.31/ext/phar/util.c:1534:15: error: storage size of ‘md_ctx’ isn’t known EVP_MD_CTX md_ctx; ^~~~~~ /usr/local/src/php5-build/php-5.6.31/ext/phar/util.c:1633:5: warning: implicit declaration of function ‘EVP_MD_CTX_cleanup’ [-Wimplicit-function-declaration] EVP_MD_CTX_cleanup(&md_ctx); ^~~~~~~~~~~~~~~~~~ Makefile:1343: recipe for target 'ext/phar/util.lo' failed make: *** [ext/phar/util.lo] Error 1 But apparently after some research this could also be linked to Openssl, can anyone confirm? Thanks again.
The previous posted patch should have solved that: Code: - EVP_MD_CTX md_ctx; + EVP_MD_CTX *md_ctx; Code: - EVP_MD_CTX_cleanup(&md_ctx); + EVP_MD_CTX_destroy(md_ctx);
An alternative would be to load 5.6 from an alternate repository, see https://www.howtoforge.com/tutorial...fig-3-from-debian-packages-on-debian-8-and-9/ (though note the red caution under preliminary notes should you want to uninstall the packages). I switched to this from self-compiled and have been quite happy with it so far (ie. no troubles yet once setup).
indeed, I use that on some servers for old-as-f php scripts - some use even older ioncube protection ... no support from vendor ( orly ^^ ). works pretty well. If however your customer or whoever is using other php-version from default and has cronjobs setup, remember to either alter the path to php-cli binary or make the old default ( check other stuff running on your sys which might have issue with that ) update-alternatives --config php
I'm going to co-op this thread for my purposes. I have a feeling I'm going to have to upgrade to stretch for pci compliance since every hit I get is for a version not on jessie. I have php 5.6.0, php 5.6.33, and php 7.1.16 loaded on my server. I just want to make sure that I won't lose the php 5's. Would I only have to worry about the issue if I was building a new Stretch server and need php5 installed?
If you upgrade to Stretch PHP 5.6 is indeed lost until You install it yourself. I got PHP 5.6, 7.0 and 7.1 following this guide: https://www.howtoforge.com/tutorial/how-to-install-php-7-for-ispconfig-3-from-debian-packages-on-debian-8-and-9/ Read also the comments, especially the comment by Jesse Norell. Also this: https://www.howtoforge.com/communit...ersions-of-php-5-6-7-1-etc-in-debian-9.77658/ One more: https://www.howtoforge.com/tutorial/how-to-install-php-5.6-and-7.1-on-debian-9-stretch/