Categories
PHP Workflow

Upgrading to PHP 7.2 locally

Tried for brew install php@7.3 – produced errors. No go 🙁

Went for 7.2 instead. Installed ok, but brew link php@7.2 didn’t work (errors).

Manually edited ~/.bash_profile to add new PHP to PATH

export PATH="/usr/local/Cellar/php@7.2/7.2.15/bin:PATH"

That got command line PHP up to date. Fast CGI config needed to be updated to listen to port 9072. Unfortunately I’ve broken the multi-version setup. Now PHP-FCGI only listens to 9072 for PHP 7.2 (no access to 5.6 or 7.1 at the moment).

/usr/local/etc/php/7.1/php-fpm.d
/usr/local/etc/php/7.2/php-fpm.d (updated this to :9072)

So Apache config (httpd-vhosts.conf) needs to point to :9072 to work.

This article at GetGrav looks very thorough, but takes a different approach of using a PHP switcher script, rather than FPM listening on different ports for different versions.

See: restarting local PHP