Code Monkey home page Code Monkey logo

Comments (12)

bjori avatar bjori commented on August 14, 2024 32

OS X 10.11 no longer ships with usable OpenSSL.

You'll have to install it from homebrew (or macports, if thats your thing).

$ sudo brew install openssl

At the end it will tell you something about not wanting to overwrite the system path as it may have unforeseen consequences, so it'll tell you where it installed the library and the header, along with how to make sure to link to that version:

$ export LDFLAGS=-L/usr/local/opt/openssl/lib
$ export CPPFLAGS=-I/usr/local/opt/openssl/include

or run brew install openssl --force (not recommended).

You don't actually have to export the variables or overwrite the system symlinks.. The PHP configure script has an --with-openssl-dir option that takes the path to openssl to build against.

So after installing OpenSSL from homebrew you need to do something like this:

$ pecl download mongodb
$ tar zxvf mongodb*.tgz
$ cd mongodb*
$ phpize
$ ./configure --with-openssl-dir=/usr/local/opt/openssl
$ make
$ sudo make install

Would be awesome if pecl provided option to avoid all this manual process, like

$ pecl install mongodb --configure --with-openssl-dir=/usr/local/opt/openssl

but thats not possible at the moment.
We'll hopefully distribute pharext archives soon, which would make this much simpler:

$ ./mongodb.ext.phar -c --with-openssl-dir=/usr/local/opt/openssl

_NOTE:_ The path /usr/local/opt/openssl/ is for reference only. Your path might be different. Check the message at the end of brew install openssl.

from mongo-php-driver.

kunal-arowana avatar kunal-arowana commented on August 14, 2024 10

I was stucked for it so long finally solved

sudo C_INCLUDE_PATH=/usr/local/opt/openssl/include /Applications/XAMPP/xamppfiles/bin/pecl install mongo

Type above command if you are using xamp

Below command if not usinf xamp
sudo C_INCLUDE_PATH=/usr/local/opt/openssl/include pecl install mongo

from mongo-php-driver.

MwirabuaTimothy avatar MwirabuaTimothy commented on August 14, 2024 3

Anyone experiencing this issue on a mac try installing using homebrew:

$ brew tap homebrew/php
$ brew install php56-mongodb

Then to link the mongodb extension binary on your php.ini

extension='/usr/local/opt/php56-mongodb/mongodb.so'

You can suit this process to your preferred php version.

from mongo-php-driver.

peterrehm avatar peterrehm commented on August 14, 2024

Thank you for the detailed information, I will give it a try the coming days. Meanwhile I have it up and running in my VM.

from mongo-php-driver.

peterrehm avatar peterrehm commented on August 14, 2024

Awesome, works as expected. I just did bew install openssl without sudo.

from mongo-php-driver.

vlaw avatar vlaw commented on August 14, 2024

Great, it works!

from mongo-php-driver.

Premitium avatar Premitium commented on August 14, 2024

I still get the configure: error: Cannot find OpenSSL's <evp.h>
even though openssl-1.0.2j is already installed.

from mongo-php-driver.

vrkansagara avatar vrkansagara commented on August 14, 2024

my comman was sudo ./pecl install mongodb

Am still getting this error

configure: error: Cannot find OpenSSL's <evp.h>
ERROR: `/private/tmp/pear/temp/mongodb/configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config' failed

from mongo-php-driver.

vrkansagara avatar vrkansagara commented on August 14, 2024

something work for me #247 (comment)

from mongo-php-driver.

ParhamZare avatar ParhamZare commented on August 14, 2024

@bjori nice great work

from mongo-php-driver.

jmikola avatar jmikola commented on August 14, 2024

@sempijjawork: Please open a new issue instead of bumping a closed thread. Additionally, you should provide complete information about your environment (e.g. OS, PHP) instead of a small paste from ./configure output.

from mongo-php-driver.

violapro avatar violapro commented on August 14, 2024

Awesome, works as expected. I just did bew install openssl without sudo.

brew

from mongo-php-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.