Home > php教程 > php手册 > linux不重新编译php增加openssl扩展

linux不重新编译php增加openssl扩展

WBOY
Release: 2016-06-06 19:47:31
Original
1070 people have browsed it

PHP代码 #下面是php的安装目录 /usr/local/php5.3.8/bin/ #切换到php安装目录的etx/openssl目录 cd/php-5.3.8/ext/openssl #查看openssl目录下有个config0.m4,把config0.m4改名为config.m4。 cpconfig0.m4config.m4 #依次执行: /usr/local/php5.3.8/bin/php

PHP代码

#下面是php的安装目录  

/usr/local/php5.3.8/bin/  

  #切换到php安装目录的 etx/openssl目录  

cd /php-5.3.8/ext/openssl  

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

cp config0.m4 config.m4  

  #依次执行:  

/usr/local/php5.3.8/bin/phpize  

  ./configure –with-openssl –with-php-config=/usr/local/php5.3.8/bin/php-config  

遇到错误configure: error: libssl not found!   yum install openssl-devel解决

  make && make install  

  #然后找到php.ini所在位置 打开 extension_dir(如果没有则自行添加), 同时添加 extension = "openssl.so"   

  #重启服务器 即可  

  #openssl 查看方法:  

/usr/local/php5.3.8/bin/php -i |grep openssl  

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