Unable to find the wrapper ”https” - did youforget to enable it when you configured PHP?

這是在Windows的命令行下用php symfony new myproject命令創建一個新的工程出現的,網上查的全部都是到php.ini中把extension=php_openssl.dll前面的“;”刪掉就行了


去掉;以後是否重啓php。
2、打印phpinfo() 查看openssl模塊是否存在。
追問

這個嗎?有的。

電腦都重啓了。。。

追答
服務器是IIS嗎?IIS貌似不支持,相見 php手冊file_get_contents
When using SSL, Microsoft IIS will violate the protocol by closing the connection without sending a close_notify indicator. PHP will report this as "SSL: Fatal Protocol Error" when you reach the end of the data. To work around this, the value of error_reporting should be lowered to a level that does not include warnings. PHP can detect buggy IIS server software when you open the stream using the https:// wrapper and will suppress the warning. When using fsockopen() to create an ssl:// socket, the developer is responsible for detecting and suppressing this warning.
使用SSL時,微軟IIS將違反協議不發送close_notify指示器關閉連接。PHP將報告爲“SSL協議:致命錯誤當你到年底的數據。爲了解決這個問題,對error_reporting值應降低到一個水平,不包括警告。PHP可以檢測車的IIS服務器軟件當你打開流使用HTTPS:/ /包裝將抑制警告。當使用fsockopen()創建SSL:/ /插座,開發商負責檢測和抑制這一警告。

修改爲curl 或者 fsockopen試試!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章