Heroku远程MongoDB连接php


Heroku remote MongoDB connect with php

从Heroku facebook应用连接到远程mongoDb时出错

Class 'Mongo' not found

我想mongo驱动程序不支持开箱即用?如何在heroku上安装它?感谢

您只需要在应用中安装mongo扩展

为您的应用程序提供Mongo驱动程序。你可以下载此处:

https://github.com/wuputah/heroku-libraries/raw/master/php/mongo/mongo.so将其添加到类似"ext"的文件夹中。

将php.ini文件添加到应用程序的根目录:

extension_dir="/app/www/ext/"extension=mongo.so

在此处找到解决方案:https://gist.github.com/1288447