PHP Zip Repository

0

Hi, everyone.

I have an issue with installing the PHP Zip extension on Amazon Linux 2023. I've installed a LEMP stack on EC2 for WordPress. I'm using the official repos for NginX and MariaDB, I also installed PHP using Amazon Linux 2023. But the extensions, Imagick and Zip, are not available on the Amazon Linux 2023 repository.

1

2 4

Thus, I used a Fedora 38 repository and installed the extensions. Since the PHP versions are different so the extensions are in separate folders. Then I linked the imagick.so file to the php8.2 modules folder and it worked. 6 3

But the zip.so doesn’t work. 5

질문됨 10달 전379회 조회
2개 답변
0

Try this

          dnf install -q -y php-devel php-pear gcc

          dnf install -q -y libzip-devel libzip
          /usr/bin/yes | pecl install zip
          echo 'extension=zip.so' > /etc/php.d/20-zip.ini

Taken from aws-samples/ec2-lamp-server GitHub.

You can also consider using the Amazon Linux 2023 CloudFormation template to create your LEMP stack EC2 instance with common PHP extensions such as zip, imagick, redis, igbinary, sodium and most of extensions as required by WordPress.

AWS
전문가
Mike_L
답변함 9달 전
0

You can see in the New Packages in AL2023.2 since AL2023.1 in the AL2023 Release Notes that php8.2-zip was added with the AL2023.2 point release, which you can read the release notes for the first AL2023.2 release (2023.2.20230920) here, which was released at the end of September 2023.

So you can now avoid building anything yourself, and just use the packaged version in AL2023.

답변함 4달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠