Search code examples
vagrantpuppetvagrantfilepuphpetvagrant-provision

Make PHP on a Puphpet/Vagrant box use specific sub version e.g. 7.0.4 vs 7.0.5


Using puphpet a typical config.yaml php section might look like this:

php:
install: '1'
settings:
    version: '70'
modules:
    php:
        - ioncube-loader

I have lots of other PHP modules installed but its ioncube I'm having issues with.

Up until just earlier, this was provisioning with PHP 7.0.4, which seemed to have a yum package for Ioncube loader.

I just had to rerun vagrant provision and now all of a sudden I appear to be on PHP 7.0.5.

Not much of a bother normally, except now I get issues with dependencies for ioncube (ioncube loader is crucial to run some encrypted 3rd party code I need).

My question is: Is it possible to lock php down to 7.0.4?

version: '704' doesn't work.

Also just to check I've understood the error message correctly:

Error: Package: php-ioncube-loader-5.1.2-1.el6.remi.5.4.x86_64 (remi)
       Requires: php(zend-abi) = 20100525-x86-64
       Installed: php-common-7.0.5-1.el6.remi.x86_64 (@remi-php70)
           php(api) = 20151012-64
       Available: php-common-5.4.45-5.el6.remi.x86_64 (remi)
           php(api) = 20100412-x86-64
       Available: php-common-5.4.45-7.el6.remi.x86_64 (remi)
           php(api) = 20100412-x86-64
       Available: php-common-7.0.4-1.el6.remi.x86_64 (remi-php70)
           php(api) = 20151012-64
       Available: php55u-common-5.5.33-1.ius.centos6.x86_64 (ius)
           php(api) = 20121113-64
       Available: php56u-common-5.6.19-1.ius.centos6.x86_64 (ius)
           php(api) = 20131106-64
       Available: php70u-common-7.0.4-1.ius.centos6.x86_64 (ius)
           php(zend-abi) = 20151012-64

Other suggestions welcome, I just need ioncube loader working on this 1 project, am I right here? It looks like its available for every version of php except the one that's magically appeared on mine since the last provision. It's totally possible I'm barking up the wrong tree....


Solution

  • Author of PuPHPet here.

    Unfortunately subversions are not supported (7.0.x), only major versions (7.0).

    This is due to the absolutely insane way each distro and even each PHP version is so different to the other in regards to INI locations and module directories. It's ridiculous.

    What could easily be added is support for ensure field to the YAML file that you could pass your specific version to. Mind opening a ticket on my github tracker to enable this?