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

0

When launching a script PHP I had a wonderful surprise:

  

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

Here is an excerpt from my PHP PHP :

<?php

$siteUrl = 'http://cnet.com';

$requestUrl = 'https://opengraph.io/api/1.0/site/' . urlencode($siteUrl);

$siteInformationJSON = file_get_contents($requestUrl);
$siteInformation = json_decode($siteInformationJSON, true);

Are there any extensions missing?

    
asked by anonymous 28.01.2017 / 08:10

1 answer

0

Go to your file php.ini and check that the php_openssl.dll extension is as a ; (semicolon) at the front. Here you can enter this way:

extension = php_openssl.dll 

Once this is done, restart Apache and try again.

    
28.01.2017 / 12:31