Today, when installing the MongoDB extension of PHP7 on the Mac, I encountered such a problem. It is too strange. Details are as follows:
The original Mac systemopenssl
Replace with Passbrew
New version installed
Currentopenssl
Version details are as follows
And PHP extensionsopenssl
It has also been opened
Passedphpize
generateconfigure
File
phpize
During generationMakefile
When is still a hintopenssl
The version is too low. What the hell is this?
./configure --with-php-config=/usr/local/Cellar/php71/7.1.13_24/bin/php-config
I’ve tried everything I can think of. I’ve really seen ghosts. What’s the situation with the old irons? What should I do? Thank you
I have seen the problem that the HEADER file cannot be found. After processing, I can successfully compile, install and generate it.
mongodb.so
Module files, but there is also a simple way to update, not to usepecl
Andphpize
Installationmongodb
Extension, that is, usingbrew install phpVS-mongodb
To install,phpVS
Is the specific version number, after installation and expansion throughbrew
Restartphp
It will take effect! This approach also facilitates management expansion throughbrew
Installed extensions will be installed at/usr/local/etc/php/7.1/conf.d/
Directory to generate the corresponding extension configuration files such asext-mongodb.ini
, restartphp
It will be loadedconf.d
The configuration file for the directory. Thanks, Laotie!