sous-chefs/php

Default Recipe Fails on Amazon Linux with PHP 7.0

Closed this issue · 1 comments

Cookbook version

5.0.0

Chef-client version

13.8.5

Platform Details

Amazon Linux 2017.09.01

Scenario:

Utilize php::default recipe to install and configure PHP 7.0 on Amazon Linux.

Steps to Reproduce:

## Set package names to install PHP 7.0 on Amazon Linux
node.default['php']['packages'] = %w[
  php70 php70-common php70-curl php70-devel php70-mbstring
  php70-mcrypt php70-mysqlnd php70-opcache php70-pdo php7-pear
  php70-pecl-apcu php70-readline
]

# Set PECL and PEAR binary for Amazon Linux PHP 7.0
node.default['php']['pear'] = 'pear7'
node.default['php']['pecl'] = 'pecl7'

# Run default recipe
include_recipe 'php'

Expected Result:

PHP 7.0 installed, php.ini created, PEAR and PECL channels updated as per code in php::default.

Actual Result:

Chef Client fails to converge.

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


           Cookbook Trace:
           ---------------
           /tmp/kitchen/cache/cookbooks/php/resources/pear_channel.rb:78:in `exists?'
           /tmp/kitchen/cache/cookbooks/php/resources/pear_channel.rb:48:in `block in class_from_file'

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/php/recipes/default.rb

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

           Compiled Resource:
           ------------------
           # Declared in /tmp/kitchen/cache/cookbooks/php/recipes/default.rb:25:in `from_file'

           php_pear_channel("pear.php.net") do
             action [:update]
             default_guard_interpreter :default
             declared_type :php_pear_channel
             cookbook_name "php"
             recipe_name "default"
             channel_name "pear.php.net"
          end


           System Info:
           ------------
           chef_version=14.0.190
           platform=amazon
           platform_version=2017.09
           ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
           program_name=/opt/chef/bin/chef-client
           executable=/opt/chef/bin/chef-client
lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.