2

I'm currently running a few LAMP stacks, where I've setup PHP 5.2, 5.3 and 5.4 by hand. All servers are running Ubuntu 12.04 LTS. 5.3 is currently installed via apt-get but all other PHP versions are compiled by hand.

I'm looking to start deploying new LAMP stacks via Puppet, and although I could write a basic script to perform the same compilation steps, I'd like to do better than that.

I've included some examples of what I'm after. The problem with all of these is that they seem to be developer focused, and even install PHP in the homedir of the user. I'm looking for something that can manage multiple versions of PHP on a production server.

I guess I could modify existing solutions, but I'm hoping to find something more purpose-built, with a decent user-base.

Boxen's Puppet PHP Module: https://github.com/mattheath/puppet-php (which depends on phpenv below):

Here I can just

include php::5_4
include php::5_3
include php::5_2

That's ultimately where I'd like to be with my Puppet config. A few simple lines, and it will take care of installation, and detecting if the version is already present so as not to re-install.

phpenv: https://github.com/phpenv/phpenv

After setting up phpenv:

phpenv install php-5.3.20

php-version: https://github.com/wilmoore/php-version

Geekman
  • 451
  • 1
  • 10
  • 21
  • 1
    I'd probably just generate packages for each different PHP version, and use apt. However, PHP 5.2 has been EOL for awhile, and 5.3 won't be around for much longer. It might be a better use of your time to update the PHP code to work on newer versions. – devicenull Mar 24 '14 at 00:07
  • @devicenull Yeah. I might go the custom deb packages approach, that sounds like a good solution. And with PHP versions... Yeah... :( Unfortunately it's a shared webserver platform, we have no control, just have to support what customers want and recommend they upgrade their sites. It's nuts how many sites still require 5.2. – Geekman Mar 24 '14 at 00:23
  • 1
    We upgraded to 5.4 awhile ago, and broke all the old PHPNuke sites people were running. It was pretty bad, but at the same time you can't really expect to run public facing software that hasn't received any sort of updates in years. – devicenull Mar 24 '14 at 00:31
  • @devicenull I know. But I'm sure I'd get chewed out by someone if I gave that as my reasoning, even though it's perfectly rational. Not to mention all the security holes in an unmaintained site. :) – Geekman Mar 24 '14 at 01:50

0 Answers0