您的位置:首页 > 理论基础 > 计算机网络

Warning: fopen() [function.fopen]: Unable to find the wrapper “https” – did you forget to enable it

2017-10-07 15:53 483 查看
前几天建立symfony项目时报错Warning: fopen() [function.fopen]: Unable to find the wrapper “https” – did you forget to enable it when you configured PHP?,网上百度一下提示没有安装openssl模块。

一:安装前提

a:安装autoconf

tar zxvf autoconf-2.69.tar.gz

cd autoconf-2.69

./configure

make && make install

b:tar zxvf openssl-1.0.2h.tar.gz

./config –prefix=/usr/local/ssl shared zlib-dynamic enable-camellia

make && make install

1、解压所安装的php源码包并查找并进入到openssl文件夹

tar -xzvf php-5.5.6.tar.gz

cd /home/alex/tar/php-5.5.6/ext/openssl

2、到这个目录之后首先要看看config.m4这个文件存在不存在,如果不存在则重命名下config0.m4即可(mv config0.m4 config.m4)

3、接下来进行编译和安装

a:找到php安装目录中phpize的位置并使用以下命令

/usr/local/php-5.5.6/bin/phpize

b:编译openssl安装

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

make && make install

c:在/usr/local/php-5.5.6/lib/php/extensions/no-debug-non-zts-20121212/中发现文件openssl.so,移动该文件至/usr/local/php-5.5.6/lib/php/extensions

5、最后在php.ini进行配置

a:查找到extension_dir并指向openssl.so所在文件位置extension_dir=”/usr/local/php-5.5.6/lib/php/extensions/”

b:打开extension=”openssl.so”

6、最后重启下php就可以了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐