Comments (12)
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.
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.
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.
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.
Awesome, works as expected. I just did bew install openssl
without sudo
.
from mongo-php-driver.
Great, it works!
from mongo-php-driver.
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.
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.
something work for me #247 (comment)
from mongo-php-driver.
@bjori nice great work
from mongo-php-driver.
@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.
Awesome, works as expected. I just did
bew install openssl
withoutsudo
.
brew
from mongo-php-driver.
Related Issues (20)
- l
- apache stop when I added extension=mongodb.so to php.ini HOT 3
- `selectServer` takes too long on official php base image (connections opened sequentially) HOT 13
- libbson Bug Report : variable ret value type error HOT 8
- No suitable servers found (`serverSelectionTryOnce` set) when rs.initiate with localhost HOT 5
- Extract mongodb-1.6.2.tgz error HOT 5
- Sporadic "Authentication failed" errors HOT 8
- MongoDB PHP Driver 1.15+ increases PHP memory consumption HOT 7
- Error while compiling on macOS HOT 7
- Major slowdown since version 1.17.0 HOT 8
- PHP Warning: PHP Startup: Unable to load dynamic library 'mongodb.so' HOT 2
- MongoDB reporting "AuthenticationAbandoned: Overridden by new authentication session" for a PHP client HOT 14
- Windows build after 1.13.0 HOT 4
- linux general protection fault , sorry for my poor english HOT 1
- PHP refusing to load MongoDB PHP driver on Windows (on one machine but not another) HOT 1
- Can't download desired extension HOT 2
- Unable to install pecl mongodb-1.15.1 in php 8.2 HOT 1
- Bug & Question: How to compile mongodb statically into PHP? HOT 9
- PHPStorm Stub for Manager class has outdated signature HOT 1
- Cannot install with laravel 11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mongo-php-driver.