Giter Club home page Giter Club logo

php's Introduction

php Cookbook

Cookbook Version Build Status OpenCollective OpenCollective License

It installs and configures PHP and the PEAR package management system. Also includes resources for managing PEAR (and PECL) packages, PECL channels, and PHP-FPM pools.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

Platforms

  • Ubuntu 18.04 / 20.04 / 22.04
  • Debian 10 / 11
  • CentOS 7+ (incl. Alma & Rocky)

Chef

  • Chef 15.3+

Attributes

  • node['php']['install_method'] = method to install php with, default package.
  • node['php']['directives'] = Hash of directives and values to append to php.ini, default {}.
  • node['php']['pear_setup'] = Boolean value to determine whether to set up pear repositories. Default: true
  • node['php']['pear_channels'] = List of external pear channels to add if node['php']['pear_setup'] is true. Default: ['pear.php.net', 'pecl.php.net']

The file also contains the following attribute types:

  • platform specific locations and settings.
  • source installation settings

Resources

This cookbook includes resources for managing:

Recipes

php::default

Include the default recipe in a run list, to get php. By default php is installed from packages but this can be changed by using the install_method attribute.

php::package

This recipe installs PHP from packages.

php::community_package

This recipe installs PHP from one of two available community package repositories, depending on platform family. This provides the ability to install PHP versions that are no provided by the official distro repositories.

Set node['php']['install_method'] = 'community_package' to use these repositories.

Please see test/cookbooks/test/recipes/community.rb for an example of how to use attributes to install the desired version of PHP & its supporting packages, and please refer to the documentation on these community repositories:

php::source

This recipe installs PHP from source.

Usage

Simply include the php recipe where ever you would like php installed. To install from source override the node['php']['install_method'] attribute within a role or wrapper cookbook:

Role example

name 'php'
description 'Install php from source'
override_attributes(
  'php' => {
    'install_method' => 'source',
  }
)
run_list(
  'recipe[php]'
)

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

php's People

Contributors

bheuvel avatar damacus avatar detjensrobert avatar djoos avatar dkinzer avatar estahn avatar hrak avatar iennae avatar jeffbyrnes avatar kitchen-porter avatar leth avatar mclyde-oracle avatar mdiniz avatar miketheman avatar mishak87 avatar nathenharvey avatar powerschill avatar prajaktapurohit avatar ramereth avatar renovate[bot] avatar restless-et avatar rockstar04 avatar rshade avatar schisamo avatar sethvargo avatar solarce avatar sufius avatar tas50 avatar xorima avatar xorimabot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php's Issues

Chef Client 13.0 Support

When using Chef Client 12.4 deprication notices are given for our LWRPs.

We may need to restructure the current LWRPs if the rewrite is not completed before chef 13 is out.

Zend_extensions are not properly detected PEAR Version: 1.9.4(Ubuntu 14.04, 12.04)

Xdebug.ini is not generated with the directive zend_extension='/usr/lib/php5/20121212/xdebug.so' but extension='/usr/lib/php5/20121212/xdebug.so'.

See /providers/pear.rb
This is because we are comparing the output of
(pear.rb:196) pecl config-get ext_dir : /usr/lib/php5/20121212+lfs
to the output of
(pear.rb:204) pecl list-files xdebug : src /usr/lib/php5/20121212/xdebug.so

the resulting value for the zend flag if false.

On solution could be reverting back to
(pear.rb: 195) p = shell_out("php-config --extension-dir")

Too many pool creation fail to restart

When chef script have too many pool creation (>=5), Chef print an error for restart fpm service, because "php5-fpm.service start request repeated too quickly", it's due to notifies in install action (One time is enough). I've not the time to optimise the thing for the moment. If somebody can do this quickly else i can do this late.

Impossible to set php package version

At this time, due to bugs in yum_package (chef/chef#3332) it is impossible to define which version of php you want to install from package.

It would be useful if you would change the packages attribute to be a Hash which would allow version and options per package, with a default used by each if not overridden.

breaking change: quotes around values disappeared from php.ini

you've introduced a breaking change where values placed in the PHP files no longer have quotes. This was entirely unexpected, and isn't even mentioned in your changelog.

-date.timezone="America/Los_Angeles"
-display_errors="Off"
-error_reporting="E_ALL & ~E_DEPRECATED & ~E_STRICT"
-expose_php="off"
-memcache.hash_strategy="standard"
-short_open_tag="on"
+date.timezone=America/Los_Angeles
+display_errors=Off
+error_reporting=E_ALL & ~E_DEPRECATED & ~E_STRICT
+expose_php=off
+memcache.hash_strategy=standard
+short_open_tag=on

In particular, the error_reporting doesn't handle that situation at all. This is a breaking change for most people, it needs to be clear in the documentation.

Installs php 5.5.9-1ubuntu4.7 (cli)

The README says that PHP 5.3 will be installed, but I am getting 5.5.9. Is this a bug or do we need to update the changelog and readme? If I use a Ubuntu 12.04 box I get 5.3, but on Ubuntu 14.04 I get 5.5.9.

Fails on FreeBSD

Various attributes and resources fail on FreeBSD due to path, user and package name mismatches.

Way to set priority of extension loading

I'm trying to do load an extension that depends on another extension, but comes earlier in the alphabet. so I need to set a lower priority for my extension. I am trying to install couchbase which depends on json.

so I'd think something like this would be nice:

php_pear "couchbase" do
  action :install
  priority "25"
end

If no one has any other ideas, I may push this as a merge request next week, just looking to see if there is another option and feeling out if there would be push back.

Handle PECL Extensions with library dependencies

I have here an example case where the the PECL extensions require some additional library dependencies. The php mongo db driver which is only present in the pecl repository currently (not in the php repository as packages). This requires the libssl-dev and pkg-config. It were nice when this library take over this extra dependency installation.

php.ini directives are not updated for pear/pecl packages

php_pear 'apc' do
  action :install
  directives(node['mycookbook']['apc_directives'])
end

This installs APC but only updates /etc/php5/conf.d/apc.ini according to node['mycookbook']['apc_directives'] if APC was not already installed. Is there a workaround for this?

Takes 2 runs for the FPM pool to be created

I'm running the cookbook in Test Kitchen on EC2. I'm running the php::default recipe, installing a few packages and installing and configuring php-fpm. The problem is that the fpm-pool doesn't get created on the first run, it takes 2 runs for it to add the /etc/php5/fpm/pool.d/www.conf file.

I've tried rearranging the order of the script but doesn't seem to make a difference.

UPDATE
I've also tried using Vagrant on Test Kitchen and the same thing happens.

include_recipe 'php::default'

package "php5-memcached" do
  action :install
end

package "php5-mysql" do
  action :install
end

package "php5-curl" do
  action :install
end

package "php5-mcrypt" do
  action :install
end

php_fpm_pool "www" do
  action :install
  listen node['webnode']['php_listen_path']
  user node['webnode']['web_user']['name']
  group node['awebnode']['web_user']['group']
  max_children 16
  start_servers 8
  min_spare_servers 4
  max_spare_servers 12
end

Cookbook version

1.9.0

Platform Details

EC2

fpm_pool :uninstall action should use correct filename

Cookbook version

1.8

Chef-client version

Doesn't matter

Platform Details

Doesn't matter

Scenario:

:uninstall action should use the same logic as the install action in determining the file name
Currently to install a pool named foo.conf I would call
php_fpm_pool 'foo'

but to uninstall I would have to do
php_fpm_pool 'foo.conf' do
action :uninstall
end

Pear config

Is there a way to set pear config for example proxy?

PHP-FPM - separate install and configuration

I think that modularizing the FPM portions a bit would make supporting PHP7 or alternate repos much easier. Instead of the php-fpm install being taken care of in the provider, I think it'd be better to just do include_recipe 'php::fpm' if users want the default package, else they can install from Remi or a PPA or whatever, and use the LWRP to manage the FPM pools.

In my specific case, I'd like to install PHP (either 5.6 or 7, depending on the project) from the Remi repos (CentOS 7). This repo isn't enabled by default in yum, so I need to pass --enablerepo=remi* to the package resource options. This isn't exposed in the LWRP, and it doesn't really matter if it is if the separation is there. If you are against separation, then allowing the passing in of yum options would be great.

Deprecated configuration items in the php.ini template

It's recommended that these settings be removed as they will be removed from future PHP versions
-> session.bug_compat_42
-> session.bug_compat_warn
-> register_globals
-> magic_quotes_gpc
-> magic_quotes_runtime
-> safe_mode
-> register_long_arrays

Crash on default run

Recipe: php::default
  * php_pear_channel[pear.php.net] action update

    ================================================================================
    Error executing action `update` on resource 'php_pear_channel[pear.php.net]'
    ================================================================================

    Errno::ENOENT
    -------------
    No such file or directory - pear channel-info pear.php.net

    Cookbook Trace:
    ---------------
    /home/braulio/chef-solo/cookbooks-2/php/providers/pear_channel.rb:88:in `exists?'
    /home/braulio/chef-solo/cookbooks-2/php/providers/pear_channel.rb:50:in `block in class_from_file'

    Resource Declaration:
    ---------------------
    # In /home/braulio/chef-solo/cookbooks-2/php/recipes/default.rb

     25: php_pear_channel 'pear.php.net' do
     26:   action :update
     27: end
     28: 

    Compiled Resource:
    ------------------
    # Declared in /home/braulio/chef-solo/cookbooks-2/php/recipes/default.rb:25:in `from_file'

    php_pear_channel("pear.php.net") do
      action [:update]
      retries 0
      retry_delay 2
      guard_interpreter :default
      cookbook_name :php
      recipe_name "default"
      channel_name "pear.php.net"
    end

php.ini shouldn't rely on per platform templates in chef

The per platform template functionality in Chef is not entirely deprecated, but hasn't been updated to support things like platform_family. By using this we're not providing platform specific templates for debian and redhat derivatives. We should do this in a different way so each platform gets the appropriate template.

PEAR installed APC has debugging enabled

I can't seem to track down how or why this is the case. When I run manually the pear command that should be getting run, it doesn't seem to have debugging enabled.

echo -e '\r' | pear install -a apc

However, when installed via chef-client, APC ends up with debugging enabled, which makes it not terribly useful.

typo in pear LWRP

The typo in this line causes the following to silently fail:

php_pear 'apc' do
  action :upgrade
end

Output (excerpt from Chef logs):

Command 'searchapc' is not valid, try 'pecl help'
[2014-11-03T10:59:42-05:00] DEBUG: php_pear[apc]: Installed version:  Candidate version:

Expected output:

PACKAGE STABLE/(LATEST) LOCAL
APC     3.1.13 (stable)       Alternative PHP Cache
APCu    4.0.7 (beta)          APCu - APC User Cache
[2014-11-03T10:29:27-05:00] DEBUG: php_pear[apc]: Installed version:  Candidate version: 3.1.13

Windows install fails

http://windows.php.net/downloads/releases/php-5.3.28-nts-Win32-VC9-x86.msi is the default windows installer URL, which can not be found. Install on windows servers with IIS does not appear to function currently.

I found a copy of the file and placed it in another URL which downloaded successfully, however the install still failed during msiexec. Not sure if x86 is mandatory or desired on server 2012r2 x64 arch.

Anybody use this cookbook to install a WIMP environment?

php-fpm Service Not Found on PHP 5 Installations

I'm running a test kitchen instance with Ubuntu 14.04 and PHP 5.5.9. I can install the php5-fpm package manually, but the php_fpm_pool resource notifies/restarts php-fpm, not php5-fpm.

Here's the tail of the chef-client run output:

       Running handlers:
       [2016-01-11T21:25:01+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2016-01-11T21:25:01+00:00] ERROR: Exception handlers complete
       Chef Client failed. 0 resources updated in 25.579421826 seconds
       [2016-01-11T21:25:01+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2016-01-11T21:25:01+00:00] ERROR: resource template[/etc/php5/fpm/pool.d/wordpress.conf] is configured to notify resource service[php-fpm] with action restart, but service[php-fpm] cannot be found in the resource collection. template[/etc/php5/fpm/pool.d/wordpress.conf] is defined in /tmp/kitchen/cache/cookbooks/php-fpm/definitions/php_fpm_pool.rb:27:in `block in from_file'

       [2016-01-11T21:25:02+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

I tried overriding the node['php']['fpm_service'] attribute to php5-fpm (instead of php-fpm) but Chef is not picking up the change. (Probably a separate issue.)

alldeps optional?

Is it possible to add an option to make alldeps an optional option for the command. It installs some requirements by default, which I'd rather install with a different method sometimes.

could not find recipe php5 for cookbook php

Hello .

While running sugarcrm cookbook book getting below error

================================================================================

Recipe Compile Error

Chef::Exceptions::RecipeNotFound


could not find recipe php5 for cookbook php

URI::InvalidURIError when using chef_zero

Hi,

pretty new to chef, so this may be me not doing something right. Using Vagrant and chef_zero as the the provisioner, I get the following when including just the basic php recipe...

URI::InvalidURIError: bad URI(is not URI?): chefzero://localhost:8889/file_store/repo/cookbooks/php/templates/debian/php.ini (1).erb

The build completes without issue if I change the provisioner to chef_solo.

Pear error

Had anyone experience this error with php 5.5.9 on ubuntu 14.04.1?

I think it has to do with the fact that php 5.4 introduced mods-available/ instead of conf.d
I temporary managed to fix this issue by setting this in my attributes
default['php']['ext_conf_dir'] = File.join(File.dirname(node['php']['conf_dir']), 'mods-available')

==> default: [2014-11-12T08:49:22+00:00] INFO: Installing php_pear[xdebug]
==> default:
==> default: ================================================================================
==> default: Error executing action create on resource 'template[/etc/php5/conf.d/xdebug.ini]'
==> default: ================================================================================
==> default:
==> default: Chef::Exceptions::EnclosingDirectoryDoesNotExist
==> default: ------------------------------------------------
==> default: Parent directory /etc/php5/conf.d does not exist.
==> default:
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/php/providers/pear.rb
==> default:
==> default: 227: template "#{node['php']['ext_conf_dir']}/#{name}.ini" do
==> default: 228: source 'extension.ini.erb'
==> default: 229: cookbook 'php'
==> default: 230: owner 'root'
==> default: 231: group 'root'
==> default: 232: mode '0644'
==> default: 233: variables(:name => name, :extensions => extensions, :directives => directives)
==> default: 234: action action
==> default: 235: end
==> default: 236: end
==> default:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/php/providers/pear.rb:227:in `manage_pecl_ini'
==> default:
==> default: template("/etc/php5/conf.d/xdebug.ini") do
==> default: provider Chef::Provider::Template
==> default: action [:create]
==> default: retries 0
==> default: retry_delay 2
==> default: guard_interpreter :default
==> default: path "/etc/php5/conf.d/xdebug.ini"
==> default: backup 5
==> default: atomic_update true
==> default: source "extension.ini.erb"
==> default: cookbook "php"
==> default:
==> default: variables {:name=>"xdebug", :extensions=>{"/usr/lib/php5/20121212/xdebug.so"=>false}, :directives=>{}}
==> default: cookbook_name :xdebug
==> default: mode "0644"
==> default: owner "root"
==> default: group "root"
==> default: end
==> default:
==> default:

error_reporting directive should not use quotes

Hi,

I have come across an issue when trying to modify the error_reporting directive.
Because the value is in quotes it cannot read it properly.
Doing php -i returns error_reporting => no value => no value
While doing the same when it's not between quotes returns error_reporting => 22527 => 22527

Add reinstall action to php_pear resource.

This feature request is related to pull request #81 and issue #82.

I do understand that this may not be used often, but I do believe it's a supported action for other package resources so maybe it makes sense to support here as well.

PHP7 Support

I haven't seen any threads about this so I thought I would ask the question: Is any work being done to prepare for PHP7? I would like to try and piggy-back on work already being done before starting it myself.

There's a few spots here and there (e.g. https://github.com/chef-cookbooks/php/blob/master/providers/pear.rb#L174) that need to be fixed to support PHP7, but for the most part it seems to be just changes to attributes and packages.

no way to configure extensions installed via packages

There is an extensions template that looks to be used for packages installed with Pear but it is not possible to use it for extensions installed via the node[:php][:packages] attribute. It would be handy to have another attribute to define configuration directives for these package installed extensions, which could be used in the extensions.ini template.

On Ubuntu 14.04 package install fails due to permission error

The install works when doing it manually with sudo.

So this fails when doing the package install:

include_recipe "php"

php_pear_channel "pear.phing.info" do
  action :discover
end

php_pear "phing/phing" do
  action :install
end

When I then do sudo pear install phing/phing, it works. The error I get through the chef run is:
Warning: lstat(): Lstat failed for /tmp/pear/cache/daead9f210a4b1daffb9efe8c6f45bb0rest.cacheid in PEAR/REST.php on line 276
PHP Warning: lstat(): Lstat failed for /tmp/pear/cache/daead9f210a4b1daffb9efe8c6f45bb0rest.cacheid in /usr/share/php/PEAR/REST.php on line 276
No releases available for package "pear.phing.info/phing"
install failed

The same error I get when manually executing pear install phing/phing (without sudo).

Maintainer activity

There is a fairly sizeable backlog of issues with this cookbook, there has been no activity in the cookbook in the past month and there are some fairly large issues that are present that warrant fixing.

I'm not sure what the process is for getting more maintainers for an official opscode cookbook is what what needs to be done to get this cookbook back on track??

Fatal error on purging broken package.

I tried purging a pear package that did not properly install because the wrong extension config directory was supplied.

php_pear 'oci8' do 
   action 'purge'
end  

The action failed with the following relevant stack trace:

[2014-08-09T18:58:37+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out      
[2014-08-09T18:58:37+00:00] DEBUG: ArgumentError: php_pear[oci8] (oracle-instantclient::php line 
ror: ArgumentError: wrong number of arguments (2 for 4)                                          
/tmp/vagrant-chef-3/chef-solo-1/cookbooks/php/providers/pear.rb:212:in `manage_pecl_ini'         
/tmp/vagrant-chef-3/chef-solo-1/cookbooks/php/providers/pear.rb:170:in `remove_package'          
/tmp/vagrant-chef-3/chef-solo-1/cookbooks/php/providers/pear.rb:181:in `purge_package'           
/tmp/vagrant-chef-3/chef-solo-1/cookbooks/php/providers/pear.rb:76:in `block (2 levels) in class_

Conflict with mysql::client recipe including when Percona used instead of mysql

When Percona used instead of MySQL and php built from source follow apt error occured:

==> default: Errors were encountered while processing:
==> default:  percona-server-server-5.6
==> default: E: Sub-process /usr/bin/dpkg returned an error code (1)
==> default: ---- End output of apt-get -q -y install mysql-client-5.5=5.5.38-0ubuntu0.14.04.1 ----
==> default: Ran apt-get -q -y install mysql-client-5.5=5.5.38-0ubuntu0.14.04.1 returned 100
==> default: [2014-09-19T15:18:16+04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

This line causes the error:
https://github.com/opscode-cookbooks/php/blob/359a6b98c60a06509b726b431b7bed47f18fc594/recipes/source.rb#L25

Can we somehow specify which recipe mysql::client or percona::client include based on some pre-setting, say some thing like node['php']['mysql_client'] = [mysql, percona](forcing users to manually include desired recipe with client break BC)?

Cannot upgrade because of unwanted mysql dependency

Hi,

I cannot upgrade past 1.5.0 because 1.6.0 onwards have a hard dependency on mysql >= 6.0.0 which conflicts with a number of other cookbooks in my project that are pinned to the 5.x series of the mysql cookbook.

There are significant breaking changes between the 5.x and 6.x series of the mysql cookbook and the maintainers strongly recommend migrating to a new physical database server instance as part of that. I'll probably do that in due course, but it doesn't seem like I should be forced to work through all of that now (and whatever changes are required to deal with updates in other cookbooks I'm using depending on mysql) just because the php::source recipe (which I'm not using) wants to install a mysql client.

I don't anyway think a mysql client is actually required for installing php from source - surely it would make more sense for this cookbook to drop the mysql requirement altogether and allow the end-user to install a mysql client themselves prior to installing php if they actually want one?

Cannot install apc when php is installed from source

I am installing php from source (5.4.32) on Centos 6.5. I then try to run the following:

php_pear "apc" do
    action :install
end

Which appears to be successful (no errors reported), however apc.so is nowhere to be found on my system.

I tried to install it manually by running sudo pecl install apc, and it compiles fine, but again, apc.so is nowhere to be found. It appears that it is installing the extension under /tmp/pear/temp/pear-build-rootJlliUZ/install-APC-3.1.13 but that directory ceases to exist once the install is complete.

The extension dir in php.ini: /usr/lib64/php/modules
Additional .ini files parsed: /etc/php.d/apc.ini

Crash on php_pear channel update on Centos 7.2 box

Trying to update the pear channel on a virtualbox centos 7.2 box vagrant.up crashes...

probably closed #105 could be the same

php_pear_channel[pear.php.net] action update[2016-02-26T01:41:41+00:00] INFO: Processing php_pear_channel[pear.php.net] action update (streaming_base::install_owncloud_php_prerequisites line 8)
==> default:
==> default:
==> default: ================================================================================
==> default: Error executing action update on resource 'php_pear_channel[pear.php.net]'
==> default: ================================================================================
==> default:
==> default: Errno::ENOENT
==> default: -------------
==> default: No such file or directory - pear
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /vagrant/chef/cookbooks/berks/php/providers/pear_channel.rb:87:in exists?' ==> default: /vagrant/chef/cookbooks/berks/php/providers/pear_channel.rb:50:inblock in class_from_file'
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /vagrant/chef/cookbooks/core/streaming_base/recipes/install_owncloud_php_prerequisites.rb
==> default:
==> default: 8: php_pear_channel 'pear.php.net' do
==> default: 9: action :update
==> default: 10: end
==> default: 11:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /vagrant/chef/cookbooks/core/streaming_base/recipes/install_owncloud_php_prerequisites.rb:8:in `from_file'
==> default:
==> default: php_pear_channel("pear.php.net") do
==> default: action [:update]
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: declared_type :php_pear_channel
==> default: cookbook_name :streaming_base
==> default: recipe_name "install_owncloud_php_prerequisites"
==> default: channel_name "pear.php.net"
==> default: end

php-pear package not installing automatically on Ubuntu 14.04

When I run the php recipe on a chef/ubuntu-14.04 box, I get the following error:

Error executing action `update` on resource 'php_pear_channel[pear.php.net]'
...
Errorno::ENOENT
------------------------
No such file or directory - pear channel-info pear.php.net

Checking the node with

pear version

I get The program 'pear' is currently not installed.

This error does not occur when I run the recipe in chef/ubuntu-12.04

Any plans to add support for PHP greater than 5.3 on Amazon Linux?

This cookbook is years old and still does not support installing from yum versions of php greater than 5.3 as all versions greater than 5.3 on Amazon Linux are labelled php54, php55, and php56.

This cookbook still relies on the platform family of rhel and version greater than or equal to 6 to install the package "php".

I honestly thought by now that someone might have complained about this. I'm surprised. I started using Chef over 2 years ago, saw this cookbook, and could not use it THEN. Disappointing to see it's still not useful on Amazon Linux. :(

Problem with php_pear on Ubuntu?

Hi Folks,

A call like this:

php_pear "odbc" do
    action :install
end

Results in an error:

RuntimeError
------------
Package obdc not found in either PEAR or PECL.

But switching this to package seems to work:

package php5-odbc do
    action :install
end

This is on a Virtualbox Precise64 box (Ubuntu). I have seen some indications that this may be related to Ubuntu. Is there a different in such an environment?

Thanks.

Cookbook version attribute overrides ohai attribute

Ohai provides a ['php']['version'] attribute that returns the installed php version (by parsing the output of php -v).

The php cookbook sets a default value for that attribute ('5.5.9') so it cannot longer be used to determine the actual php version, as least when using the install from package method.

Errno::EFAULT: Bad address

I'm new with chef, I'm getting an error to upload php cookbook. Do you guys know what I'm doing wrong.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.