upgrade PHP

How to upgrade php via portupgrade?
Need to update with dependencies
Characteristics: FreeBSD 11.4 PHP72 (need to upgrade to 74)

portupgrade -rR php72 (doesn't work, errors ...)
php74 conflicts with php72-hash (Installs files into the same place)
 
Any reason why you're using ports? If you simply run pkg upgrade it will get upgraded pretty much automatically. You'll only need to install www/mod_php74 yourself (if you use mod_php).
 
I've had zero problems just running pkg upgrade when moving from PHP 7.2 to 7.4. Most of the time pkg(8) already does the right thing.
 
/usr/ports/UPDATING has a few hints, but it's basically a manual process:
Code:
20200914:
  AFFECTS: users of lang/php72
  AUTHOR: tz@FreeBSD.org

  The default version of PHP has been switched from 7.2 to 7.4.

  If you use binary packages you should make a list of php packages
  before running 'pkg upgrade':

  # pkg info php7\* > ~/installed-php-ports-list

  After the upgrade, check with such list if all your php extensions
  are still installed, and reinstall them if needed.

  If you use mod_php72 you need to deinstall it and install mod_php74.
Basically boils down to making a list of installed extensions, then delete your installed PHP and extensions, build & install the new PHP, build & install the extensions you need (made from the pkg info step). If you use mod_php remember to take care of that too.

Sounds like a faff but doesn't take that long (30 minutes?) I'd recommend backing up config files, and if you've got a test system or VM, I'd recommend installing PHP 7.2 on there and doing a test upgrade to PHP 7.4 to give yourself some confidence it's going to work.
 
building php74-extensions from ports bombed for me a few days ago on 11.4 box
had to manually touch
/usr/local/include/php/ext/php_config.h and then it went ok (mostly)
 
Back
Top