php_install

July 9, 2026 ยท View on GitHub

By default, installs the php packages appropriate for your platform and adds a php.ini to the default location for that platform.

Actions

  • :install: Installs PHP packages (default)

Properties

NameTypeDefault
----------------------------------------------------------------------------------
packagesStringPlatform-specific - see libraries/helpers.rb
options[String, Array]
conf_dirStringPlatform-specific - see libraries/helpers.rb
ini_templateStringphp.ini.erb (see templates/<distro>/php.ini.rb)
ini_cookbookStringphp (this cookbook)
directivesHash{}
ext_dirStringPlatform-specific - see libraries/helpers.rb

Examples

Install the default packages for your platform

php_install 'php' do
  action :install
end

See test/cookbooks/test/recipes/community.rb for an example for installing from a community repository.