I’m pretty sure the zip extension was included by default in the amazon managed php elb image.
The usual way to do this was adding a config file like this to .ebextensions
packages:
yum:
php-zip70: []
However that doesn’t work anymore.
Any ideas?
2
Answers
This seemed to work for me as of 08/17/23
Add a config file like this to .ebextensions
EDIT Seems like the install commands can only be ran 1 time, otherwise there will be an error that kills the eb deploy because the module is already installed. Working on a more robust solution
@asdfasdfsdfga gave some good hints. A more modern approach:
Add the file .platform/hooks/prebuild/install-php-zip.sh
Note that "pecl install zip" will return an error code if already installed (?!), resulting in your deployment failing the second time you attempt to deploy. Instead, use upgrade, which will install if not already installed, and complete successfully if already installed.
The pecl command will insert ‘extension="zip.so"’ at the top of /etc/php.ini.