Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?
Solution 1:
I solved it in XAMPP by uncommenting ;extension=php_openssl.dll
in /apache/bin/php.ini
despite phpinfo() telling me /php/php.ini
was the loaded ini file.
EDIT: I guess Ezra answer is the best solution directly adding the extension line to the appropriate ini file.
Solution 2:
I had to add extension=php_openssl.dll
to my php.ini
file located in xampp/php/php.ini
. Somehow it was not there, after adding it and restarting Apache everything was working fine.
Solution 3:
just add two lines in your php.ini file.
extension=php_openssl.dll
allow_url_include = On
its working for me.
Solution 4:
Your Apache is probably not compiled with SSL support. Use cURL instead of file_get_contents anyway. Try this code, if it fails then I am right.
function curl_get_contents($url)
{
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
$data = curl_exec($curl);
curl_close($curl);
return $data;
}
Solution 5:
I have enable the openssl extention and it work for me :)
;extension=php_openssl.dll
to
extension=php_openssl.dll