Is it possible to upgrade PHP in an environment built with puPHPet?
If I have a firewall built with puPHPet on OSX, is it possible to upgrade PHP from 5.5 to 5.6 using just change the config file, or do I need to reinstall from scratch?
Alternatively, it is easier to update PHP via the guest OS package manager, in this case Ubuntu 14.04 . In this case it is a single development environment (not a big team), but later I can provide the same environment for a second developer and / or cloud service, and then I need the latest stable PHP.
UPDATE
I've tried editing puphpet / config.yml as expected:
php:
install: '1'
version: '56'
composer: '1'
composer_home: ''
modules:
php:
- cli
- intl
- mcrypt
pear: { }
pecl:
- pecl_http
ini:
display_errors: On
error_reporting: '-1'
session.save_path: /var/lib/php/session
timezone: Europe/London
mod_php: 0
And then did vagrant reload
, but php -v
it still shows 5.5.14. I also tried vagrant reload --provision
it and it seemed to do a lot more than just restarting the VM (started via prep scripts), but the PHP version hasn't changed.
source to share
Nearby, as I know it should be easy enough to do.
Adjust puphpet/config.yml
to reflect changes and run vagrant provision
.
To clarify, to update the PHP version, I have adjusted:
php:
install: '1'
version: '54'
to
php:
install: '1'
version: '56'
the exact location of this information in config.yml for me right now is on line 109 through 111. But the file can change depending on features that may or may not be added, so don't rely on that too much.
source to share
Actually, I don't think you can do it, the deeper puppet doesn't know how to do it.
However, you can add a custom script that will do the trick, but the best solution for me is to destroy and re-create your virtual machine (which shouldn't be a problem, I guess, according to vagrant philosophy).
(I tried deleting the / .puphpet-stuff / directory in the vm as I thought the vagrant would think it was a clean install after restarting the abusive position, but it doesn't work any better.)
Good luck.
source to share