Quick way to upgrade from PHP5.6 to PHP7.2 on FreeBSD

There are many reasons why anyone will need to switch to PHP 7.2 his machine – here, here, here and many more PoC …

Use script like attached bellow:

#!/usr/local/bin/bash for FILE in `pkg info | grep php56 | cut -f1 -d’ ‘` ; do PKGNAME=`pkg info „$FILE“ | grep ‘Origin’ | cut -f2 -d’:’` ; NEWPKGNAME=“${PKGNAME//php56/php72}“ ; echo „Replacing port $FILE with $NEWPKGNAME“ ; portmaster -o „$NEWPKGNAME $FILE“ ; done portmaster pecl\* portmaster pear\*

Next you should check that everything from dynamic libraries is correctly linked with command „php -v“.

Hints for some “missing“ packages:

portmaster -o devel/php72-intl pecl-intl-3.0.0_12 portmaster -o security/pecl-mcrypt php56-mcrypt-5.6.34

Този сайт използва Akismet за намаляване на спама. Научете как се обработват данните ви за коментари.