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

来源:互联网 发布:淘宝网官网下载2017 编辑:程序博客网 时间:2024/05/18 01:33

前几天建立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就可以了

阅读全文
0 0
原创粉丝点击