简体   繁体   中英

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM