Php 类别';Memcached';在Laravel Elastic Beanstalk应用程序中找不到
我正在向amazon elastic beanstalk应用程序部署一个laravel 6项目。它正在运行php7.3 期间Php 类别';Memcached';在Laravel Elastic Beanstalk应用程序中找不到,php,laravel,amazon-web-services,amazon-elastic-beanstalk,Php,Laravel,Amazon Web Services,Amazon Elastic Beanstalk,我正在向amazon elastic beanstalk应用程序部署一个laravel 6项目。它正在运行php7.3 期间 eb部署 错误:ServiceError-部署应用程序失败 查看日志,我发现它找不到类“Memcached” @php artisan包:discover--ansi 这些实例运行的是AmazonLinux2.9 我还添加了一个配置文件来使用这些包安装memcache。 它是.ebextensions/memcache\u installer.cfg.yml 内容如下:
eb部署
错误:ServiceError-部署应用程序失败
查看日志,我发现它找不到类“Memcached”
@php artisan包:discover--ansi
这些实例运行的是AmazonLinux2.9
我还添加了一个配置文件来使用这些包安装memcache。
它是.ebextensions/memcache\u installer.cfg.yml
内容如下:
packages:
yum:
memcached: []
php-pecl-memcached: []
这个错误仍然没有消失。但是,它们确实会被安装,因为如果我尝试从实例中安装它们,我得到的包已经安装。我们解决了这个问题(至少在我们的repo上)。删除php-pecl-memchached
,因为amazon-yum版本将php5作为依赖项(我们在错误日志中看到了这一点)
我们添加到.ebextensions
的内容:
memcached.config
:
packages:
yum:
memcached: []
container_commands:
01_memcached_start:
command: "/sbin/service memcached restart"
commands:
01unzip:
command: "tar -zxvf /tmp/AmazonElastiCacheClusterClient-2.0.1-PHP73.tar.gz -C /usr/lib64/php/7.3/modules"
files:
/etc/php.d/project.ini:
content: |
extension=amazon-elasticache-cluster-client.so
group: ec2-user
mode: "000644"
owner: ec2-user
elasticache_01.config
files:
"/tmp/AmazonElastiCacheClusterClient-2.0.1-PHP73.tar.gz" :
mode: "000777"
owner: ec2-user
group: ec2-user
source: http://elasticache-downloads.s3.amazonaws.com/ClusterClient/PHP-7.3/latest-64bit
elasticache_02.config
:
packages:
yum:
memcached: []
container_commands:
01_memcached_start:
command: "/sbin/service memcached restart"
commands:
01unzip:
command: "tar -zxvf /tmp/AmazonElastiCacheClusterClient-2.0.1-PHP73.tar.gz -C /usr/lib64/php/7.3/modules"
files:
/etc/php.d/project.ini:
content: |
extension=amazon-elasticache-cluster-client.so
group: ec2-user
mode: "000644"
owner: ec2-user
可能的副本您找到这个问题的答案了吗?在从AmazonLinux7.2迁移到7.3EBS imageNo之后,我们遇到了同样的问题。最终使用了7.2..很有趣。。。PHP7.1->PHP7.3AMI似乎发生了巨大的变化。