1. The server is customized and I don’t know the corresponding centos version;
2. PHP is compiled by itself, and the source code of the corresponding version is not retained on the server. Use /pathto/php -v to find out the PHP version number, and then use wget to download the corresponding PHP source code package;
3. Press the code, go to the ext/openssl directory of the source code, and use phpize to configure the compilation environment. 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 there are config.w32 and config0.m4 in the openssl directory, and rename config0.m4 to config.m4.
<span>mv</span> config0.m4 config.m4
Execution:
/usr/local/bin/phpize
Compile:
./configure --with-openssl --with-php-config=/usr/local/bin/php-<span>config </span><span>make</span>;<span>make</span> <span>install</span>
After the prompt is successful, add extension = openssl.so in php.ini
Restart apache or php-fpm and complete.