Amazon Linux 2 amazon-linux-extras PHP 8.1 support

21

Hello,

Do we have any estimate on when PHP 8.1 will be added to amazon-linux-extras on Amazon Linux 2?

Thanks!

  • Yes please. This has been months now. Why do updates continue to come out with no php81? https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platform-history-php.html

  • Came here to post the same question. It's now 4 months post release and there are a lot of goodies in php8.1 which we can access without having to build from source or enable additional yum repos.

  • This is really frustrating - 8.0 was available shortly after release, so what is happening here? I check availability at least once a week (much more often most weeks) - but it never comes...

    If the intention is NOT to add it, I'd like to know, so we can change repo for the future, so any indication of an ETA one way or another would help enormously.

  • It would be nice to get an update to this. AWS has traditionally been super slow on PHP upgrade / modules...Hopefully soon!

  • Symfony 6.1 is loaded as a dependency when installing Laravel 8.8. Symfony 6.1 requires PHP 8.1. i guess AWS does not plan to support Laravel 8 or 9 on its AL2 EC2 instances?

asked 2 years ago16039 views
9 Answers
2

The official Beanstalk roadmap for all platforms is here: https://github.com/aws/elastic-beanstalk-roadmap/projects/1 . PHP 8.1 is in the "we're working on it" status.

AWS
answered 2 years ago
profile pictureAWS
EXPERT
reviewed 10 months ago
  • Looks like it shipped, but amazon-linux-extras does not have it yet.

  • Yeah, https://github.com/aws/elastic-beanstalk-roadmap/issues/214 shows it's now under the "just shipped" status with it being detailed in https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2022-10-03-linux.html as well. So it's there for Elastic Beanstalk users, but it's then oddly missing from amazon-linux-extras (something that previously had a new version be made available for both EB & Amazon Linux Extras whereas it took an unusually long time for 8.1.x to be added to EB with it still missing from Amazon Linux Extras even months after EB got it added.)

    It really is strange that it's still missing from the amazon-linux-extras as running amazon-linux-extras list | grep php just returns php8.0=latest enabled [ =stable ] and php7.4 available [ =stable ] with 8.1 not even being an option months after it was added to EB & nearly a year after 8.1 was released.

  • Btw, https://repost.aws/questions/QUYOYerObQQ36CDxBsry62Ow/how-to-request-php-8-1-to-be-added-to-amazon-linux-extras#ANNfyIbulKQaSI55t6uD_2qQ has an AWS Support Engineer say "We cannot provide a timeline or guarantee for availability of this package from Amazon Linux's repositories." so they don't even know if we should expect Amazon Linux 2's set of packages to add PHP support beyond 8.0...? Though that was 6 months ago... although we also haven't gotten an answer of whether or not this will be done let alone when it's planning to be done (seems crazy to not add it since even EB has it now.)

  • Good news. Amazon-Linux-extras 8.1 is AVAILABLE NOW

1

I have no answer, I just continue to wait week after week, month after month with no indication how to request this feature in a better way. PHP 8.1 was released in November of 2021, so we've waited November, December, January, February and now into March. What is going on?

answered 2 years ago
1

I'm waiting on this too. It feels like Amazon Linux 2 has been neglected ever since AL 2022 was announced. PHP updates are delayed, MariaDB is 5 versions behind, awscli is very outdated, etc.

answered 2 years ago
  • PHP 8.0.x is at 8.0.16 right now at the time of commenting, so that is receiving relatively frequent updates - but 8.1 is completely overlooked for unknown reasons. 😡

  • Good news. Amazon-Linux-extras 8.1 is AVAILABLE NOW

1

I wonder when AWS will finally make PHP 8.1 available on amazon-linux-extras, such that it can be used with Amazon Linux 2? We have been waiting for this for months now. Please speed it up!

snabela
answered 2 years ago
1

Here is how to upgrade from PHP 8.0 to PHP 8.1 on Amazon Linux 2 w/o Remi which does not supply binaries for ARM i.e. Apple Silicon, AWS ARM Graviton. This approach also works on x86.

Remove PECL imagick package, as it will conflict with the upgrade. AWS forgot to include Imagick as an installable package.

yum remove php-pecl-imagick

Disable PHP 8.0

amazon-linux-extras disable php8.0

Enable PHP 8.1

amazon-linux-extras enable php8.1

Install all packages including those required for building Imagick.

yum clean metadata
yum install php-cli php-pdo php-fpm php-json php-mysqlnd php-devel php-pear gcc make tar ImageMagick ImageMagick-devel ImageMagick-perl

Install and enable Imagick

pecl install imagick
echo "extension=imagick" > /etc/php.d/20-imagick.ini

If you are doing this in a docker container, your Dockerfile should look something like this depending on all the PHP modules you need. With this config, you get all the base PHP modules + Imagick + MySQL.

FROM amazonlinux:latest

RUN yum install -y \
    ruby \
    nodejs \
    php-pear \
    php \
    php-cli \
    php-devel \
    php-gmp \
    php-fpm \
    php-mbstring \
    php-opcache \
    php-common \
    php-pdo \
    php-mysqlnd \
    php-gd \
    php-sodium \
    php-xml \
    php-process \
    python3-pip

# Install dev libraries for PECL
RUN yum install -y \
    php-devel \
    php-pear \
    gcc \
    make \
    tar \
    ImageMagick \
    ImageMagick-devel \
    ImageMagick-perl

RUN pecl install imagick && echo "extension=imagick" > /etc/php.d/20-imagick.ini

# Remove the dev stuff to keep the container small
RUN yum remove -y \
    php-devel \
    php-pear \
    gcc \
    make \
    ImageMagick-devel \
    ImageMagick-perl

And then we wait for Laravel 10 to be released!

Cheers, Juha

answered a year ago
0

php8.1 was created in "amazon-linux-extras", but

The file doesn't seem to exist.

php8.1=latest enabled

Could not retrieve mirrorlist https://amazonlinux-2-repos-ap-northeast-2.s3.ap-northeast-2.amazonaws.com/2/extras/php8.1/latest/aarch64/mirror.list error was 14: HTTPS Error 403 - Forbidden!

Enter image description here Enter image description here

answered a year ago
0

Please make the update to PHP 8.1 please, it's would be really helpful! It's been release for nearly a year now....

answered 2 years ago
0

Symfony 6.1 is loaded as a dependency when installing Laravel 8.8. Symfony 6.1 requires PHP 8.1. I guess AWS does not plan to support Laravel 8 or 9 on its EC2 instances?

answered 2 years ago
0

Given the (presumably) pending release of AL2022, I wouldn't hold your breath. In any case, I've found that if you want to keep PHP up to date, you're better off installing it from another source (e.g. https://rpms.remirepo.net/), although of course you have to do your due diligence to ensure it meets your security and audit requirements.

Ed
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions