Git Product home page Git Product logo

php55-cookbook's Introduction

Description

Installs and configures PHP 5.5


Requirements

Platform

  • Debian, Ubuntu
  • CentOS, Red Hat, Fedora
  • Amazon Linux

Cookbooks

  • php
  • build-essential
  • apt
  • yum

License and Author

Author:: Adar Porat ([email protected])

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

php55-cookbook's People

Contributors

aporat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

php55-cookbook's Issues

undefined method `baseurl' for Chef::Resource::YumRepository

Hi,

We have some problems when using this cookbook.

Error executing action run on resource 'ruby_block[Compile Custom OpsWorks Run List]'

NoMethodError

undefined method `baseurl' for Chef::Resource::YumRepository

Resource Declaration:

In /opt/aws/opsworks/releases/20150423171152_24100020150423171152/cookbooks/opsworks_custom_cookbooks/recipes/execute.rb

3: ruby_block("Compile Custom OpsWorks Run List") do
4: block do
5: begin
6:
7: # Reload cookbooks after they're available on local filesystem
8: cl = Chef::CookbookLoader.new(Chef::Config[:cookbook_path])
9: cl.load_cookbooks
10: self.run_context.instance_variable_set(:@cookbook_collection, Chef::CookbookCollection.new(cl))
11:
12: # Expand run list with custom cookbooks and load them into the current run_context
13: opsworks_run_list = Chef::RunList.new(*node[:opsworks_custom_cookbooks][:recipes])
14: Chef::Log.info "New Run List expands to #{opsworks_run_list.run_list_items.map(&:name).inspect}"
15: self.run_context.load(opsworks_run_list)
16:
17: rescue Exception => e
18: Chef::Log.error "Caught exception while compiling OpsWorks custom run list: #{e.class} - #{e.message} - #{e.backtrace.join("\n")}"
19: raise e
20: end
21:
22: end
23: end

Compiled Resource:

Declared in /opt/aws/opsworks/releases/20150423171152_24100020150423171152/cookbooks/opsworks_custom_cookbooks/recipes/execute.rb:3:in `from_file'

ruby_block("Compile Custom OpsWorks Run List") do
retry_delay 2
cookbook_name :opsworks_custom_cookbooks
recipe_name "execute"
block_name "Compile Custom OpsWorks Run List"
retries 0
block #Proc:0x00007f158156aa48@/opt/aws/opsworks/releases/20150423171152_24100020150423171152/cookbooks/opsworks_custom_cookbooks/recipes/execute.rb:4
action "run"
end

May I know how to fix it?

Thanks

Keith

Error executing action `install` on resource 'package[php-xml]'

Hi.

We have this error after we added php55

Error executing action install on resource 'package[php-xml]'

Chef::Exceptions::Exec

returned 1, expected 0

Resource Declaration:

In /var/lib/aws/opsworks/cache.stage2/cookbooks/mod_php5_apache2/recipes/default.rb

4: package pkg do
5: action :install
6: ignore_failure(pkg.to_s.match(/^php-pear-/) ? true : false) # some pear packages come from EPEL which is not always available
7: end
8: end

Compiled Resource:

Declared in /var/lib/aws/opsworks/cache.stage2/cookbooks/mod_php5_apache2/recipes/default.rb:4:in `block in from_file'

package("php-xml") do
action [:install]
retries 0
retry_delay 2
package_name "php-xml"
version "5.3.29-1.7.amzn1"
cookbook_name "mod_php5_apache2"
recipe_name "default"
end

[2015-05-13T10:53:45+00:00] INFO: Running queued delayed notifications before re-raising exception
[2015-05-13T10:53:45+00:00] INFO: bash[logdir_existence_and_restart_apache2] sending restart action to serviceapache2
[2015-05-13T10:53:45+00:00] INFO: Processing service[apache2] action restart (apache2::default line 32)
[2015-05-13T10:53:49+00:00] INFO: service[apache2] restarted
[2015-05-13T10:53:49+00:00] ERROR: Running exception handlers
[2015-05-13T10:53:49+00:00] ERROR: Exception handlers complete
[2015-05-13T10:53:49+00:00] FATAL: Stacktrace dumped to /var/lib/aws/opsworks/cache.stage2/chef-stacktrace.out
[2015-05-13T10:53:49+00:00] ERROR: package[php-xml](mod_php5_apache2::default line 4) had an error: Chef::Exceptions::Exec: returned 1, expected 0
[2015-05-13T10:53:49+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Does it relate ?

Thanks for your time

Support for ubuntu

It seems that this recipe doesn't actually configure for ubuntu, the final when "debian" is only referencing the "platform" not the "platform_family". Included "ubuntu" but the package did not install properly. Soooo... I made a make shift block before it for ubuntu. I would have done a pull request but I am a complete chef/ruby noob so I doubt this is best practice but I figured it could help someone who could apply what I did in a better fashion. ๐ŸŽฑ

 when "ubuntu"
    include_recipe "apt"

    execute "python-software-properties" do 
      command "apt-get install -y python-software-properties"
      action :run
    end

    execute "install php55" do
      #command "apt-get install -y php5"
      command "add-apt-repository ppa:ondrej/php5 && apt-get update -y && apt-get install -y php5 php5-mcrypt php5-json"
      action :run
    end

    execute "restart apache2" do
      #command "apt-get install -y php5"
      command "service apache2 restart"
      action :run
    end

This works flawlessly on my Vagrant Ubuntu 12.04 provisioning. I might test it on AWS Opsworks later on. Keep in mind the repo installs apache 2.4 as a dependancy so running most apache2 recipes usually cause errors because there are some breaking changes between 2.4 and older versions. I hope this helps, thank you :)

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.