Updating the php version of the chef php cookbook
chef-infra, php, ubuntu, vagrant
Solution
I am new to this as well, and I did the same exact thing. I believe you need to add a package that points to the version of php you want.
Here is a recipe that you can check out. https://github.com/homemade/chef-dotdeb
You want to add this at the top of of your run_list before you call the php recipe
ex.
If you're using vagrant (If you are not, you better go download it, it will make your life fun again) http://www.vagrantup.com
chef.add_recipe("dotdeb")
chef.add_recipe("dotdeb::php54")
chef.add_recipe("apache2")
chef.add_recipe("apache2::mod_php5")
chef.add_recipe("apache2::mod_rewrite")
chef.add_recipe("php")
I hope this helps you out.
EDIT: I got to test this out, and it works. Goodluck!
Problem
I am new to chef and trying to configure the php cookbook to install php 5.4.8 instead of the default php 5.3.10 on Ubuntu. I've tried adding this setting in the attributes/default.rb file of my custom cookbook: `default['php']['version'] = '5.4.8'` but the installed version is still 5.3.10 `php -v` `PHP 5.3.10-1ubuntu3.4 with Suhosin-Patch (cli) (built: Sep 12 2012 19:00:43) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies` How do I override the default setting for php version? Edit: Vagrant repo with php 5.4 based on the answer https://github.com/AlexDisler/php54-chef-env