I am getting acquainted with AWS and I'm using Amazon Linux on EC2 to build a LAMP stack.

I read somewhere on the AWS site that the AMI 2013.09 had PHP 5.5 but when I installed it and followed the LAMP tutorial, http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html, I found that version 5.3 was installed.

Have I missed something? Or misread something perhaps?

I can no longer find the URL that detailed what was in 2013.09. Is there resource that details what's in each release?

  • No idea why you got downvoted (twice!). This is a good question; upvoted. – Alastair Irvine Feb 27 '14 at 2:21

Amazon Linux provides PHP 5.3, 5.4, and 5.5 as options. yum install php55 will get the 5.5 version. yum search php will give you the various packages in a nice list to review.


Amazon Linux AMI 2013.09 Release Notes - found with a google search for 'AMI 2013.09'.


Steps (Use sudo only if required)

1) Remove OLD Apache

sudo service httpd stop
sudo yum erase httpd httpd-tools apr apr-util

2) Remove OLD PHP

sudo yum remove php-*

if it´s a clean installation start from here:

3) Install PHP 5.6 (Apache 2.4 will be automatically installed with this)

sudo yum install php56

4) Make sure all the required PHP extensions are installed

yum list installed | grep php

5) If not then install them using

sudo yum install php56-xml php56-xmlrpc php56-soap php56-gd

6) To list the other available php extensions

yum search php56

7) PHP 5.6 MySQL extension (Assume you have already installed MySQL)

sudo yum install php56-mysqlnd

(NOTE: it is not php56-mysql)

8) Start / Restart Apache

sudo service httpd start
sudo service httpd restart

9) Check the version

php -v
httpd -v

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.