Passer au contenu

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?

demandé il y a 4 ans17,6 k vues
9 réponses
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
répondu il y a 3 ans
AWS
EXPERT
vérifié il y a 2 ans
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?

répondu il y a 4 ans
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.

répondu il y a 4 ans
  • 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!

répondu il y a 3 ans
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

répondu il y a 3 ans
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

répondu il y a 3 ans
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....

répondu il y a 3 ans
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?

répondu il y a 3 ans
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.

répondu il y a 3 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.