PHP MongoDB 驱动程序和共享虚拟主机
我刚刚部署了我的 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一般来说,共享托管提供商不适合 PHP/MongoDB 部署。让 MongoDB 与 PHP 一起使用需要进行编译和一些配置更改,而这些通常无法在共享主机上执行。
您基本上有两个选择:
鉴于您使用 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:
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.