Google Cloud App引擎引擎标准部署具有PHP 7.4 / 8.1 MongoDB扩展

发布于 2025-02-14 01:05:29 字数 741 浏览 3 评论 0原文

我已经在PHP标准7.4环境及其运行中成功部署了该应用程序,今天我想更新它,当我进行GCLOUD应用程序部署时,我会得到:

Problem 1
    - Root composer.json requires PHP extension ext-mongodb * but it is missing from your system. Install or enable PHP's mongodb extension.
Problem 2
    - mongodb/mongodb is locked to version 1.4.0 and an update of this package was not requested.
    - mongodb/mongodb 1.4.0 requires ext-mongodb ^1.5.0 -> it is missing from your system. Install or enable PHP's mongodb extension.

因此,我检查了部署的php.ini文件,它将在root文件夹中(与yaml文件相同的级别)和包含:

extension=mongodb.so
extension=redis.so
extension=igbinary.so

我是否错过了任何Google Cloud Update?我想知道它没有抱怨MongoDB PHP扩展的版本,只是说没有扩展名?

我还尝试切换到PHP 8.1运行时,但我遇到了相同的错误。

I have already successfully deployed the app in php standard 7.4 environment and its running, today i wanted to update it and when i do gcloud app deploy i get:

Problem 1
    - Root composer.json requires PHP extension ext-mongodb * but it is missing from your system. Install or enable PHP's mongodb extension.
Problem 2
    - mongodb/mongodb is locked to version 1.4.0 and an update of this package was not requested.
    - mongodb/mongodb 1.4.0 requires ext-mongodb ^1.5.0 -> it is missing from your system. Install or enable PHP's mongodb extension.

So i checked the php.ini file for the deployment, its in the root folder (same level as the yaml file) and contains:

extension=mongodb.so
extension=redis.so
extension=igbinary.so

Did i missed any google cloud update? I am wondering cause it does not complain about the version of the mongodb php extension and just says there is no extension?

I also tried to switch to PHP 8.1 runtime but i got the same error.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

掩耳倾听 2025-02-21 01:05:29
"provide" : {
    "ext-mongo": "*"
},

我能够通过将其添加到我的作曲家。

"provide" : {
    "ext-mongo": "*"
},

i was able to fix it by adding this to my composer.json .. somehow i never needed it until today.

梦里°也失望 2025-02-21 01:05:29

为我添加到composer.json为我工作,所以 ext-mongodb 而不是 ext-mongo (我无法对 user1334817

"provide" : {
    "ext-mongodb": "*"
}

Worked for me adding to composer.json, so ext-mongodb instead of ext-mongo (I cannot comment on the answer of user1334817 )

"provide" : {
    "ext-mongodb": "*"
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文