Page 1 of 1

Error file_get_contents()

Posted: Fri Dec 11, 2009 1:59 pm
by kapil1089theking
This is the error

Notice: file_get_contents() [function.file-get-contents]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\wamp\www\paisa\web extractor.php on line 4

Warning: file_get_contents(https://mobile.bet365.com/wap?task=upda ... w!&login=F) [function.file-get-contents]: failed to open stream: No error in C:\wamp\www\paisa\web extractor.php on line 4
not found

I am using WampServer Version 2.0 with PHP Version 5.2.9-2

Re: Error file_get_contents()

Posted: Fri Dec 11, 2009 2:35 pm
by pickle
The errors are pretty self explanatory. Searching for them in Google usually gives good results.

Re: Error file_get_contents()

Posted: Fri Dec 11, 2009 2:41 pm
by McInfo
Find this line in your php.ini:

Code: Select all

;extension=php_openssl.dll
Change it to

Code: Select all

extension=php_openssl.dll
(Remove the semicolon.)

Edit: This post was recovered from search engine cache.

Re: Error file_get_contents()

Posted: Fri Dec 11, 2009 2:47 pm
by kapil1089theking
No I have wiped the semicolon and then Wamp exited then I started the wamp nothing change in the error,

Then I put a @before the function it worked but the problem is now the contents are not coming to my variable now the simple code is:

<?php
$url = 'https://www.google.com';
$contents = @file_get_contents($url) or die ("ERROR");
echo $contents;
?>

its printing nothig. Any help is appreciated//

Re: Error file_get_contents()

Posted: Fri Dec 11, 2009 3:11 pm
by McInfo
Make sure you are editing the correct php.ini file. Go to http://localhost/?phpinfo=1 and search the page for "Loaded Configuration File". Also search the page for "openssl" to confirm that OpenSSL is enabled.

Do not use the error control operator (@) when debugging. It hides errors from you. Just because you don't see an error doesn't mean that the script "worked".

Edit: This post was recovered from search engine cache.