How to install PHP IMAP extension on Amazon Elastic Beanstalk

amazon-elastic-beanstalk, linux, php

Solution

I had the same problem. I figured out that if you list all the installed packages with:

yum list installed | grep php

You'll see:

php55-common.x86_64            5.5.17-2.89.amzn1            @amzn-updates/latest
php55-devel.x86_64             5.5.17-2.89.amzn1            @amzn-updates/latest
php55-gd.x86_64                5.5.17-2.89.amzn1            @amzn-updates/latest

It seems that all the Amazon packages are php55-xxxx rather than php-xxxx.

This worked for me via ssh. I haven't tried it via a container command.

sudo yum install php55-imap

Problem

I've tried it with the container command: ``` install_php_imap: command: yum install php-imap ``` but I still get this error when I try to use it: ``` Call to undefined function imap_open() ``` Any help would be greatly appreciated.

Original source