Home > Article > Backend Development > How to install openssl extension on mac php
How to install openssl extension in mac php: 1. Enter the php source code directory and add a soft link to the openssl library to the current directory; 2. Modify php.ini; 3. Add "extension=openssl.so" ;4. Restart php-fpm.
The operating environment of this article: macOS10.15 system, PHP7.1 version, MacBook Air 2019 computer
How to install openssl on mac php Extension?
Add openssl extension to php under mac:
Enter the php source code directory
cd ext/openssl mv config0.m4 config.m4 phpize && ./configure && make && make install
If it says during the make process openssl/** file not found, add a soft link to the openssl library to the current directory,
For example: if the system installs openssl through brew install openssl, the corresponding directory should be /usr/local/Cellers /openssl/1.1.2k/openssl...,
I forgot the specifics, you can go to that directory and have a look, you will find a directory containing c header files and source files,
ln -s /usr/local/Cellers/..... openssl, so when you include openssl/** during make, go back to /usr/local/Cellers/.... and find the corresponding file
Modify php.ini
Add extension=openssl.so
Restart php-fpm.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to install openssl extension on mac php. For more information, please follow other related articles on the PHP Chinese website!