title: Installing and Enabling PHP7.1 on AWS Elastic beanstalk
body: <p>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.</p>
  
  <p>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</p>
  
  <p>Below is my sample upgrade script:</p>
  
  <pre><code>  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
  </code></pre>
  
  <p>But unless I run the <code>source /opt/remi/php71/enable</code> every time, I can't seem to get PHP71 by default as the PHP cli runtime.</p>
  
  <p>In a bid to fix that, I did <code>yum remove php70*</code> to clean up the old PHP7.0 installation but that led to a problem with the AWS EBS deployment hook scripts.</p>
  
  <p>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.</p>
  
  <p>Thank you.</p>