0

There isn't really much more to this than the title suggests.

My Vagrantfile is as such:

VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
  config.vm.box = "precise64"

  config.vm.box_url = "http://files.vagrantup.com/precise64.box"
  config.vm.network :private_network, ip: "192.168.33.21"
  config.vm.provision :shell, :path => "install.sh"
  config.vm.synced_folder ".", "/var/www", 
      owner: "www-data", group: "www-data"
end

The install.sh file that provisions the server contains these lines:

sudo apt-get install -y vim curl python-software-properties
sudo add-apt-repository -y ppa:ondrej/php5
sudo apt-get update

sudo apt-get install -y php5 apache2 libapache2-mod-php5 php5-curl php5-gd 
     php5-mcrypt php5-readline mysql-server-5.5 php5-mysql git-core php5-xdebug drush

This provides me with the following version of PHP

 PHP 5.5.34-1+deb.sury.org~precise+1 (cli) (built: Mar 31 2016 15:14:00)

However, to replicate my production environment I need 5.5.9. Do you know can I can specify that version? I've read that adding the version number (e.g. php5=5.5.9) after php5 package should work but it doesn't for me.

I'm really confused and any advice would be greatly recieved.

Thanks

useyourillusiontoo
  • 1,287
  • 1
  • 10
  • 24
  • 1
    That Ubuntu version is years past its end of life. It's out of date, insecure, and not supported. Upgrade. 5.5.9 Probably isn't in the package repositories for a reason. – cat May 01 '16 at 18:16
  • This may get more support were it asked on http://askubuntu.com, but it would be closed as off-topic there because 12.04 is Too Old. – cat May 01 '16 at 18:18
  • 1
    This sounds like the [XY problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem). PHP 5.5.9 is ancient and [full of unpatched security flaws.](https://www.cvedetails.com/vulnerability-list/vendor_id-74/product_id-128/version_id-164957/PHP-PHP-5.5.9.html) Under no circumstances should you be running it in production. And as others have said, that version of the OS is also ancient. Why not work on a migration path to current versions of the software? – elixenide May 01 '16 at 18:26
  • Hi. Thanks for the advice. I'm new in the job guess my first task will be to tell them to upgrade the server to Ubuntu 14 and, if possible php7 – useyourillusiontoo May 01 '16 at 19:24
  • For sure. Outdated `Ubuntu` with outdated `php5` looks like there could be more software outdated/unpatched in entire infra, which is high security risk. Definitely makes sense to shout it loud. – Eugen May 02 '16 at 17:40

0 Answers0