PHP MongoDB 驱动程序和共享虚拟主机

发布于 2024-12-17 03:16:53 字数 128 浏览 4 评论 0原文

我刚刚部署了我的 php/mogodb 网站(共享网络托管中的 php 部分,mongohq 中的 mongodb)

我的问题是共享网络主机中安装的 php 不包含任何 mongo 驱动程序

如何解决这个问题?

i just deployed my php/mogodb website (php part in a shared web hosting, and mongodb in mongohq)

my probleme is that the instaled php in the shared web host don't contains any mongo driver

How to solve this?

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

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

发布评论

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

评论(1

尝蛊 2024-12-24 03:16:53

一般来说,共享托管提供商不适合 PHP/MongoDB 部署。让 MongoDB 与 PHP 一起使用需要进行编译和一些配置更改,而这些通常无法在共享主机上执行。

您基本上有两个选择:

  1. 联系您的提供商并要求他们为您执行安装。这可能会发生,也可能不会发生,但可能值得一通。
  2. 获取一个可以配置的小型“虚拟机”。有很多主机可以为您提供具有完全访问权限的 512MB 计算机(Linode、Joyent、Rackspace、AWS 等)。

鉴于您使用 MongoHQ 进行 MongoDB 托管,我会检查他们用于托管的数据中心。在同一个 DC 中获取虚拟机肯定会有助于提高应用程序的速度。

Generally speaking, shared hosting providers are not equipped for PHP/MongoDB deployments. Getting MongoDB working with PHP requires a compilation and some config changes which you generally cannot do on shared hosts.

You basically have two options:

  1. Contact your provider and ask them to perform the installation for you. This may or may not happen for you, but it's probably worth a call.
  2. Get a small "virtual machine" that you can configure. There are lots of hosts that will give you 512MB computer with full access (Linode, Joyent, Rackspace, AWS, etc).

Given that you're using MongoHQ for your MongoDB hosting, I would check which Data Center they're using for hosting. Getting a VM in the same DC will definitely help the speed of your app.

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