Error on https even if I enabled openssl - php

I'm trying to do a simple script like this with easyphp installed on my pc:
<?php
include_once ('C:\EasyPHP-Devserver-17\eds-binaries\php\php713vc14x86x170802204733\simple_html_dom.php');
$html = file_get_html('https://www.sports-reference.com/olympics/summer/1896/');
echo $html;
?>
I enabled in php.ini the php_openssl extension but I still get the error:
Warning: file_get_contents(): Unable to find the wrapper "https" - did
you forget to enable it when you configured PHP? in
C:\EasyPHP-Devserver-17\eds-binaries\php\php713vc14x86x170802204733\simple_html_dom.php
on line 75
What else could I do?
I have this from phpinfo:
I tried to put php.ini files into c:\windows but it still does not work.

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 :-)

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?

sqlsrv driver for Windows PHP PDO SQL server

I've added and enabled in php.ini given .dll, got Microsoft SQL Server 2012 Native Client, previously configured it successfully on 2 other machines, but on my local one It just says could not find driver have I missed something?
php.ini: extension=php_pdo_sqlsrv_54_ts.dll
script: new PDO("sqlsrv:Server={$_dbConfig['server']};Database={$_dbConfig['dbName']}", $_dbConfig['username'], $_dbConfig['password'])
In php error log I get strange: [08-Nov-2014 18:18:31 UTC] PHP Warning: PHP Startup: in Unknown on line 0 but have no idea why, php.ini itself is configured as my other working machines.
I had to change in php.ini:
extension_dir = "ext" to extension_dir = "C:\PHP\ext"
Got it from here: https://serverfault.com/a/240012/193005

Call to undefined function curl_init() in wampp

I am getting an error. I have done the following:
Find file php.ini and uncomment in wamp apache folder
Find file php.ini and uncomment in wamp php folder
checked in wamp extensions
download file and replace php_curl-5.3.13-nts-VC9-x64.zip
restart wamp.
But I still get error
Fatal error: Call to undefined function curl_init() in C:\wamp\www\wordpress\wp-content\plugins\test\curl_http_client.php on line 66
Call to undefined function curl_init
You either edit wrong php.ini file or something is missing on your system, preventing curl extension from loading. You shall check with phpinfo() where is proper php.ini, then check if you got extension entry for cURL really enabled. If so and it is still not working then next step should be checking Apache's error.log looking for detailed error messages from PHP.

Why won't PEAR work on my PHP Windows installation?

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"

Categories