1. The server has been customized and I do not know the corresponding centos version;
2. PHP is compiled by yourself, and the source code of the corresponding version is not retained on the server. Find the php version number through/pathto/php-v, and then download the corresponding php source code package through wget;
3. pressurize the code to the ext/openssl directory of the source code and configure the compiling environment using phpize. The general steps are as follows:
Cannot find config. m4.
Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module
Check that the openssl directory contains config. w32 and config0.m4, and change config0.m4 to config. m4.
Mv config0.m4 config. m4
Run:
/Usr/local/bin/phpize
Compile:
./Configure -- with-openssl -- with-php-config =/usr/local/bin/php-configmake; make install
After the prompt is successful, add extension = openssl. so to php. ini.
Restart apache or php-fpm.