How to install openssl extension on mac php

藏色散人
Release: 2023-03-13 12:40:01
Original
4446 people have browsed it

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.

How to install openssl extension on mac php

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template