0

When I want to scrap data from https site, I get this warning:

file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\wamp\www\Demo\simple_html_dom.php on line 76 Warning: file_get_contents(https://www.google.com.pk/?gws_rd=cr&ei=wqsUWObDHYbhvgTAworgBQ): failed to open stream: No error in C:\wamp\www\Demo\simple_html_dom.php on line 76

I tried all the things like uncomment extension=php_openssl.dll and On allow_url_include. Is there something else that I can do?

Jaap
  • 81,064
  • 34
  • 182
  • 193
Techgeeks1
  • 556
  • 1
  • 4
  • 18
  • I'm not sure what we can add here that isn't a duplicate from [this question](http://stackoverflow.com/questions/5444249/unable-to-find-the-wrapper-https-did-you-forget-to-enable-it-when-you-config) (which you've obviously seen based on what you've tried). Assuming you're using this from a web browser, have you restarted apache? Can you verify the correct php.ini is loaded via `phpinfo()`? – HPierce Oct 29 '16 at 22:43
  • Phar: PHP Archive support enabled Phar EXT version 2.0.2 Phar API version 1.1.1 SVN revision $Id: 02776458f3b53f9c4694356ef19e77b32d03ecd3 $ Phar-based phar archives enabled Tar-based phar archives enabled ZIP-based phar archives enabled gzip compression enabled bzip2 compression disabled (install pecl/bz2) OpenSSL support disabled (install ext/openssl) – Techgeeks1 Oct 30 '16 at 08:55
  • openssl support is disbales in phpinfo() what i can do now? – Techgeeks1 Oct 30 '16 at 08:56

1 Answers1

0
  1. Are you sure that you're editing the right php.ini file? Under WAMP there are two php.ini files one for the cli and one for apache.

  2. Maybe your apache is compiled without the php-openssl lib. Could you provide your phpinfo() settings?

Nightforce
  • 28
  • 5
  • thanx for reply nightforce.Actually i am new to php n i dont knw much about it so i changed all the php.ini files which contain the (extension=php_openssl.dll and allow_url_include). There are 2 files of ini and 2 configuration files(phpforapache and other one is php) i changed all the 4. help me to resolve issue plz – Techgeeks1 Oct 29 '16 at 19:06