简体   繁体   English

如何在Amazon Elastic Beanstalk上安装PHP IMAP扩展

[英]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. 似乎所有的亚马逊软件包都是php55-xxxx而不是php-xxxx。

This worked for me via ssh. 这通过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 您需要确保在您的服务器上安装了哪个PHP版本
before installing new extension. 在安装新扩展之前。

if you have php 5.6 and install other version, it still won't work for you! 如果你有PHP 5.6并安装其他版本,它仍然不适合你!

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 http://mdb-blog.blogspot.co.il/2015/11/how-to-install-php-imap-extension-on.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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