【问题标题】:unresolved warning message when running php script: file_get_contents(): Unable to find the wrapper "https"运行 php 脚本时出现未解决的警告消息:file_get_contents(): Unable to find the wrapper "https"
【发布时间】:2011-01-29 11:19:44
【问题描述】:

我在 Windows 7 上运行 php 5.2.17 php 是通过命令行而不是在服务器上运行的。

我收到以下错误消息

C:\java\newsweaver-api-v2\simple>php list-tags.php

Notice: file_get_contents(): Unable to find the wrapper "https" - did you forget
 to enable it when you configured PHP? in C:\java\newsweaver-api-v2\simple\list-
tags.php on line 30

所以我下载了 OpenSSL windows 二进制文件 http://www.slproweb.com/products/Win32OpenSSL.html

我下载了 Microsoft Visual C++ 2008 Redistributable Package (x86) http://www.microsoft.com/downloads/en/confirmation.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en

我在其他地方读到,我需要在我的 php.ini 文件中将 ;extension=php_openssl.dll 更改为 extension=php_openssl.dll,但我的 php 文件不包含

;extension=php_openssl.dll

在进行这些更改后,我尝试再次运行 php 文件,我得到了相同的错误消息。

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

非常感谢任何帮助!

【问题讨论】:

    标签: ssl openssl fopen php


    【解决方案1】:

    【讨论】:

    • 嗨,我运行它并得到以下输出 C:\java\php>php phptest.php openssl: no http wrapper: yes https wrapper: no wrappers: array(6) { [0] => string(3) "php" [1]=> string(4) "file" [2]=> string(4) "data" [3]=> string(4) "http" [4]=>字符串(3)“ftp”[5]=>字符串(13)“compress.zlib”}
    • 只要您没有启用 OpenSSL,它将无法工作。 ypu 是否将 extension=php_openssl.dll 添加到 php.ini?
    • 感谢回复我在 Windows 7 上运行 wamp扩展至 C:\wamp\bin\php\php5.3.0\ext 的目录,并且在执行完 openssl 之后仍未启用?
    • 以下链接似乎很有希望在 wamp 中设置 openssl 我希望这些步骤有效neubreed.com.au/blog/2008/07/…
    猜你喜欢
    • 2011-05-22
    • 2018-03-07
    • 2018-10-21
    • 2021-08-30
    • 1970-01-01
    • 1970-01-01
    • 2016-08-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多