doukun0888 2015-07-16 11:58
浏览 213
已采纳

PHP 5.6 OpenSSL无法正常工作

I am trying to create an API but running into the following error

file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?

Checking if OpenSSL and wrappers are enabled:

openssl: no
http wrapper: yes
https wrapper: no
wrappers: array(6) { [0]=> string(3) "php" [1]=> string(4) "file" [2]=> string(4) "glob" [3]=> string(4) "data" [4]=> string(4) "http" [5]=> string(3) "ftp" }

Tried everything I could find but nothing works.

PHP version: 5.6.1
OS: SLES 12

If you need more info please let me know.

In order to enable the php_openssl extension I did the following:

  • Installed php-openssl via YAST in SLES 12
  • added "extension=php_openssl.so" to the correct php.ini file
  • 写回答

2条回答 默认 最新

  • duanba8070 2015-07-31 12:39
    关注

    Re-installed OpenSSL and it's working now.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?