Home > Backend Development > PHP Tutorial > How to add PHP openssl extension to an unknown CentOS server_PHP tutorial

How to add PHP openssl extension to an unknown CentOS server_PHP tutorial

WBOY
Release: 2016-07-13 10:29:34
Original
766 people have browsed it

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



Execution:

/usr/local/bin/phpize
Copy after login


Compile:

./configure --with-openssl --with-php-config=/usr/local/bin/php-<span>config
</span><span>make</span>;<span>make</span> <span>install</span>
Copy after login


After the prompt is successful, add extension = openssl.so in php.ini
Restart apache or php-fpm and complete.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/771654.htmlTechArticle1. The server is customized and I don’t know the corresponding centos version; 2. PHP is compiled by myself, and the server The source code of the corresponding version is not retained on the system. Use /pathto/php -v to find out the PHP version number...
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