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?
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.
Maybe your apache is compiled without the php-openssl lib.
Could you provide your phpinfo() settings?
Related
I try to load PHP from console (in windows) and when I run phpinfo.php the line
Loaded Configuration File => (none)
but when I run this pagin in web browser I see it:
Loaded Configuration File C:\MAMP\conf\php5.6.28\php.ini
My problem appear when I try to install symfony
Warning: readfile(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in Command line code on line 1
Warning: readfile(https://symfony.com/installer): failed to open stream: Invalid argument in Command line code on line 1
I can't able to download this file from console, can anyone help me please?
$response = file_get_contents($requestUri,0, $context);
gives the following errors
Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\wamp\www\bing_basic.php on line 58
Warning: file_get_contents(https://api.datamarket.azure.com/Bing/Search/Web?$format=json&Query=%27dfg%27): failed to open stream: No such file or directory in C:\wamp\www\bing_basic.php on line 58
Any advice on how to go about removing them?? I am using a Bing API key to get results on a HTML page using WAMP.
Enable extension=php_openssl.dll within your php.ini file, then restart your server.
I'm running Wampserver on Windows 7, and I can't seem to get PEAR to work. Well, that's
not entirely true-apparently it works on the command line (both cmd.exe and on Cygwin).
Here's the sample program I found on PHP.Net that shows you if PEAR is installed:
<?PHP
require_once 'System.php';
var_dump(class_exists('System', false));
?>
On the command line, it returns "bool(true)", and in the browser I get
Warning: require_once(System.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\foobar.php on line 3
Fatal error: require_once() [function.require]: Failed opening required 'System.php' (include_path='.;C:\php\pear') in C:\wamp\www\foobar.php on line 3
I'm honestly not sure what I'm doing wrong. It seems like both should work, but I'm stumped.
Thanks.
Looks like your apache (or other webserver) is picking up wrong php.ini.
Make a page with a call to phpinfo()
Load the page in browser
Check the PHP.ini path its using.
Copy your proper php.ini to that location.
Based on your comments, it looks like your include_path is wrong. Go change your PHP.ini and set your include path to:
include_path = ".;C:\wamp\bin\php\php5.3.10\pear"
I just leased a dedicated windows server with Plesk 10.4 installed. I assumed that php, etc would all be configured and that I could prot my sites over with no isses...
Turns out the default image didn't have pear installed...I believe i need pear so include statements work in php...so I used go-pear.bat to install it...
However, I'm still getting an error when including (you can follow the path to see the file exists)
Warning: include(Connections/SamConnection.php) [function.include]: failed to open stream: Operation not permitted in C:\Inetpub\vhosts\80stunes.com\httpdocs\index.php on line 3
Warning: include() [function.include]: Failed opening 'Connections/SamConnection.php' for inclusion (include_path='.;C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5\PEAR;C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP5;./includes;./pear') in C:\Inetpub\vhosts\80stunes.com\httpdocs\index.php on line 3
Any ideas on what I have done wrong? I can run pear commands from a command prompt when accessing my pleskphp5 directory
Sounds like you may have open_basedir enabled.
I followed exactly what's in: How to use PHP_CodeSniffer with XAMPP? (no more no less)
But i encounter this error:
Warning: require_once(PEAR/Exception.php): failed to open stream: No such file or directory in C:\path\to\htdocs\php-codesniffer\CodeSniffer\Exception.php on line 17
Found out what's wrong. PEAR is not initially enabled in xampp.
include_path = ".;C:\Documents\xampp\php\PEAR"
Also consider this if your changing the include_path value in your php scripts via ini_set.