Archive for January 17th, 2019

FreeBSD – Restoring inappropriately removed lang/php56 port

FreeBSD removed the lang/php56 port from the ports repository (in commits r488887) through r488894, approximately). This is due to a misunderstood “2019-01-01 lang/php56: Security Support ends on 31 Dec 2018”.

However, php.net says (emphasis added by me):

PHP 5.6.40 Released – 10 Jan 2019

The PHP development team announces the immediate availability of PHP 5.6.40. This is a security release. Several security bugs have been fixed in this release. All PHP 5.6 users are encouraged to upgrade to this version.

For source downloads of PHP 5.6.40 please visit our downloads page, Windows source and binaries can be found on windows.php.net/download/. The list of changes is recorded in the ChangeLog.

Please note that according to the PHP version support timelines, PHP 5.6.40 is the last scheduled release of PHP 5.6 branch. There may be additional release if we discover important security issues that warrant it, otherwise this release will be the final one in the PHP 5.6 branch. If your PHP installation is based on PHP 5.6, it may be a good time to start making the plans for the upgrade to PHP 7.1, PHP 7.2 or PHP 7.3.

FreeBSD removed the php56 port and dependencies as of 5.6.39. Users may be depending on either PHP 5.6 semantics, or on a port that was removed (such as devel/pecl-intl) as “collateral damage”.

I needed to restore these kits for those reasons. While I will be migrating to a PHP 7.x release with the next major rebuild of the systems in the coming month, I needed to deploy the 5.6 security fixes before then. I created a kit that restored many (but not all) of the removed ports, which you can download here. Security conscious users should NOT blindly install kits from untrusted sources like me, but instead create their own kits by looking at the official FreeBSD ports tree here. However, if you just need a quick fix and trust me, feel free to use my kit:

cd /usr/ports
tar -xpvf ~/php56-restore.tgz
mv MOVED /usr/ports/
mv php.mk /usr/ports/Mk/Uses/
portupgrade -an (to see what ports will be updated)
portupgrade -ai (interactively approve/deny updating individual ports)

Note that my kit does modify 2 “global” ports files – MOVED and php.mk. You may wish to restore the official versions after updating your php56 ports to avoid possible issues with other ports (though restoring MOVED will also restore the warnings about php56 ports being EoL and removed, and will try to update your php56-extensions if you let it).