Mongo PHP Driver 1.2.10 with MAMP

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 07:37:19

I followed the instructions at Develop MongoDB web apps with MAMP under Mac OS X to successfully build mongo.so for MAMP with php 5.3 on OS X 10.7.3.

I'm adding this for historical purposes -- I guarantee that if you're having the same set of problems, you'll want to do this.

Personally, I had a really difficult time getting MAMP's php version to play nicely with the extension builds that I was trying to make.

I discovered that the problem was that MAMP really hadn't been set up to add extensions in general, and during the compilation of the mongo php drivers, it wasn't installing it in the right place -- so I followed the following tutorial on preparing MAMP for additional pecl and pear extensions.

After following those steps to prepare MAMP for adding extensions, you can easily install any extension.

At the part where it starts talking about adding an extension, use sudo pecl install mongo and restart apache from your MAMP interface.

Kerkness

I ran into the same problem when upgrading from PHP 5.3 to 5.4 and was able to solve it by following these steps:

  1. Make sure to upgrade php5-cli as well as just php5 and php5-common

  2. Uninstall the mongo drive

    sudo pecl uninstall mongo
    
  3. Re-install the mongo driver

    sudo pecl install mongo
    
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!