Funso Popoola
Funso Popoola

Reputation: 78

Installing and Enabling PHP7.1 on AWS Elastic beanstalk

Most PHP vital libraries have been mandating PHP7.1 in their releases lately and I happen to have an API staged on AWS elastic beanstalk PHP7.0 platform that I'd like to make compliant with this recent change.

Seeing as Amazon has greatly delayed this shift since December 1, 2016 release of PHP7.1, I've tried so many things to make PHP7.1 available on this AWS Elastic beanstalk platform originally intended for PHP7.0

Below is my sample upgrade script:

  sudo su
  yum -y remove php70
  wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
  sudo rpm -Uvh remi-release-6*.rpm
  yum-config-manager --enable remi-php71

  wget ftp://195.220.108.108/linux/epel/6/x86_64/scl-utils-20120229-1.el6.x86_64.rpm
  rpm -Uvh scl-utils-20120229-1.el6.x86_64.rpm

  yum -y install php71
  source /opt/remi/php71/enable
  yum -y install php71-php-soap php71-php-bcmath php71-php-devel php-71-php-intl php71-php-mbstring php71-php-mcrypt php71-php-mysqlnd php71-php-opcache php71-php-pgsql php71-php-odbc php71-php-pecl-uuid php71-php-pecl-memcache php71-php-igbinary php71-php-oauth php71-php-xml php71-php-xmlrpc php71-php-process php71-php-apcu

But unless I run the source /opt/remi/php71/enable every time, I can't seem to get PHP71 by default as the PHP cli runtime.

In a bid to fix that, I did yum remove php70* to clean up the old PHP7.0 installation but that led to a problem with the AWS EBS deployment hook scripts.

Right now, I'm in a fix and it seems like I have to be forced to work with PHP7.0 and downgrade most of my PHP libraries. I just want to know if anyone can get me out of this messed up state.

Thank you.

Upvotes: 1

Views: 1906

Answers (2)

gmsantos
gmsantos

Reputation: 1419

Amazon released a new version of Elastic beanstalk with PHP 7.1 support.

Upgrade your environment to use this configuration.

Upvotes: 2

Remi Collet
Remi Collet

Reputation: 7031

Remi repository provides 2 way to install PHP 7.1

  • base packages (php-*) 1 repository by version, single version allowed, so you need remi-php71 repository enabled
  • SCL packages (php71-php-*) designed for parallel installation in remi-safe repository (which you have installed)

As explain in the FAQ. Also see the Wizard instructions.

Upvotes: 2

Related Questions