Git Product home page Git Product logo

Comments (1)

arvidbjorkstrom avatar arvidbjorkstrom commented on July 17, 2024

If someone finds this via google, like I did, I thought I'd share the code I ended up with

when "ubuntu"
    include_recipe "apt"

    package "python-software-properties" do
        action :install
    end

    apt_repository "ondrej-php-#{node["lsb"]["codename"]}" do
        uri "http://ppa.launchpad.net/ondrej/php5/ubuntu"
        distribution node["lsb"]["codename"]
        components ["main"]
        keyserver "keyserver.ubuntu.com"
        key "E5267A6C"
    end

    [ "php5", "php5-mysql", "php5-curl", "php5-mcrypt" ].each do |pkg|
        package pkg do
            action :install
            version "5.5.*"
            notifies :restart, "service[apache2]", :delayed
            notifies :run, "execute[apt-get autoremove]", :delayed
        end
    end
end

or, even better, use the php5_ppa cookbook: http://community.opscode.com/cookbooks/php5_ppa
replacing

    apt_repository "ondrej-php-#{node["lsb"]["codename"]}" do
        uri "http://ppa.launchpad.net/ondrej/php5/ubuntu"
        distribution node["lsb"]["codename"]
        components ["main"]
        keyserver "keyserver.ubuntu.com"
        key "E5267A6C"
    end

with

include_recipe "php5_ppa::from_ondrej"

I'd also recommend taking a look at the apache 2.4 cookbook here http://github.com/onehealth-cookbooks/apache2-onehealth

from php55-cookbook.

Related Issues (3)

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.