I'm trying to update the PHP installation on my FreeBSD machine. I ran

portsnap fetch update
cd /usr/ports/lang/php56
make reinstall
cd /usr/ports/lang/php56-extensions
make reinstall
service apache24 restart

then reloaded the page where I have the output of phpinfo() displayed and it's still showing 5.6.24 but if I run php --version at a shell prompt, I get

PHP 5.6.31 (cli) (built: Aug 30 2017 13:40:53)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Obviously I forgot a step here, but it's been a while since I did this and my memory is a bit foggy...


As pointed out by arrowd, I had two more steps to run:

cd ../../www/mod_php56/
make clean reinstall

(Note that without the make clean the 5.6.24 working directories stuck around, I'm not sure why.)


Yep, reinstall www/mod_php56 too.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.