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.


I've tried editing puphpet / config.yml as expected:

    install: '1'
    version: '56'
    composer: '1'
    composer_home: ''
            - cli
            - intl
            - mcrypt
        pear: {  }
            - pecl_http
        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

5 answers

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:

    install: '1'
    version: '54'



    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.



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.



To update the php version I had to destroy the VM ( vagrant destroy

), change the version in config.yml

and then make a new onevagrant up



Had the same problem after upgrading config.yml

from PHP version "54" to "56" in CentOS firewall.

vagrant provision

followed by vagrant reload

doesn't work.

vagrant destroy

followed by vagrant up

worked for me too.



Doesn't work for me with either vagrant provision

. In the end, I logged in via SSH and updated the php manually.



All Articles