Home > php教程 > php手册 > body text

在一个未知的CentOS服务器中如何加上PHP的openssl扩展

WBOY
Release: 2016-06-13 09:34:59
Original
1005 people have browsed it

1. 服务器是定制过的,不知对应的centos版本;

2. PHP是自己编译的,而且服务器上没有保留对应版本的源代码,通过/pathto/php -v 找出php版本号,然后wget去下载对应的php源码包;

3. 加压代码,到源码的ext/openssl目录下,使用phpize的方式进行编译环境的配置,大致步骤如下:

Cannot find config.m4.
Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module

查看openssl目录下有个config.w32和config0.m4,把config0.m4改名为config.m4。

<span>mv</span> config0.m4 config.m4
Copy after login



执行:

/usr/local/bin/phpize
Copy after login


编译:

./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

 


提示成功后,在php.ini里加入extension = openssl.so
重启apache或php-fpm,完成.

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!