Skip to content

Instantly share code, notes, and snippets.

@anhphamt
Last active November 5, 2016 18:19
Show Gist options
  • Save anhphamt/0f408c91448173a51847995b486478bf to your computer and use it in GitHub Desktop.
Save anhphamt/0f408c91448173a51847995b486478bf to your computer and use it in GitHub Desktop.
Update header OpenSSL "El Capitan" and build MongoDB Driver PHP

Apple removed the OpenSSL header files in "El Capitan", making it hard to build OpenSSL-dependent libraries without modifying your system a little bit.

I find a solution for it https://solitum.net/openssl-os-x-el-capitan-and-brew/

$ cd /usr/local/include
$ ln -s ../opt/openssl/include/openssl

If you're installing MongoDB Driver for XAMPP on OSX, this will be helpful for you.

The Apache will not start with success build and install MongoDB Driver from pecl. YOu can get the source code and re-build it with option --with-mongodb-sasl=no

$ cd /path/to/mongo-php-driver
$ phpize
$ ./configure --with-mongodb-sasl=no
$ make clean && make all && make install

Some issues when install mongodb extension PHP mongodb/mongo-php-driver#247

$ git clone https://github.com/mongodb/mongo-php-driver.git
$ cd mongo-php-driver
$ git submodule sync && git submodule update --init
$ phpize
$ export LDFLAGS=-L/usr/local/opt/openssl/lib
$ export CPPFLAGS=-I/usr/local/opt/openssl/include
$ ./configure --with-mongodb-sasl=no
$ make all -j 5
$ make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment