PHP:No such file or directory - php

$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.

Related

PHP SQLite Extensions not loading

I'm trying to load an extension on my PHP site:
$db->loadExtension('libdbplusql_81203.so');
PHP.ini:
sqlite3.extension_dir = /usr/lib/php/20180731
Error-Log from Apache2:
PHP Warning: SQLite3::loadExtension(): /usr/lib/php/20180731/libdbplusql_81203.so.so: cannot open shared object file: No such file or directory in /var/www/pdb/index.php on line 76
Can't figure out why this is not working.... and it's weird, that in the error log it says ".so.so" - when I change my code to:
$db->loadExtension('libdbplusql_81203');
Error Log say:
PHP Warning: SQLite3::loadExtension(): Unable to load extension at '/usr/lib/php/20180731/libdbplusql_81203' in /var/www/pdb/index.php on line 76
Maybe you have an idea :-)

MAMP (windows) different php.ini loaded from console..why?

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?

PHP Apache site error: failed opening required 'C:/xampp/htdocs/tutorial_php/Übung1/seite1.php'

I am absolute beginner trying to get my first PHP script working on the localhost server.
I wrote some lines of code for it and saved it in the C:/xampp/htdocs folder.
After that step I wanted to load my site in my browser. The problem is, now I get this error message:
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required 'C:/xampp/htdocs/tutorial_php/Übung1/seite1.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0
I read something about it, tried to set another permission, but nothing worked so far. Could you please help me?
try the following on your cmd line:
php -S localhost:8888 -t public

Simple HTML DOM parser error in localhost

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?

Can't resolve include_path issues in CakePHP 2.x

I have a CakePHP install that won't resolve paths correctly using include_path.
Here's an example of an error from the PHP log.
PHP Warning: include(\website\cakephp\lib\Cake\Utility\Debugger.php): failed to open stream: No such file or directory in D:\website\cakephp\lib\Cake\Core\App.php on line 545
PHP Warning: include(): Failed opening '\website\cakephp\lib\Cake\Utility\Debugger.php' for inclusion (include_path='.;d:\website') in D:\website\cakephp\lib\Cake\Core\App.php on line 545
PHP Fatal error: Class 'Debugger' not found in D:\website\cakephp\lib\Cake\Error\ErrorHandler.php on line 223
My website is installed on drive D: but all calls to App::uses resolve to paths where the drive letter has been removed.
I've specified include_path = ".;D:\website" in the php.ini file.
Not sure what else can be done to resolve this issue.
EDIT:
If I change the input_path to .;D:\ then includes start working correctly.
I'm thinking there is something wrong with how my index.php configures paths.

Categories