user1688726
user1688726

Reputation: 349

How to install PHP IMAP extension on Amazon Elastic Beanstalk

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.

Upvotes: 2

Views: 4192

Answers (2)

mr.baby123
mr.baby123

Reputation: 2312

Basically, in order to make it work,
you need to make sure which PHP version installed on your server
before installing new extension.

if you have php 5.6 and install other version, it still won't work for you!

to get current installed extension, use:

php -v

or

yum list installed | grep php

and
then install the appropriate one:

sudo yum install php55-imap

or

sudo yum install php55-imap

or

any other...

referrer and full guide.
http://mdb-blog.blogspot.co.il/2015/11/how-to-install-php-imap-extension-on.html

Upvotes: 0

Helpful
Helpful

Reputation: 116

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

Upvotes: 10

Related Questions