Post by ozstar » Wed May 23, 2018 9:08 am

HI,

Have installed Google ReCaptach and got keys.

After choosing it in Admin and testing the 'I am not a Robot' on the Contact page, I get this error at the top of the Contact page.
I get this at the ReCapture option after I hit Submit .

Verification is not correct.

Any help please?
Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/laybuy/public_html/catalog/controller/extension/captcha/google.php on line 27Warning: file_get_contents(https://www.google.com/recaptcha/api/si ... 53.210.129): failed to open stream: no suitable wrapper could be found in /home/laybuy/public_html/catalog/controller/extension/captcha/google.php on line 27

Active Member

Posts

Joined
Fri Mar 09, 2012 7:47 am
Location - Sydney OZ

Post by yodapt » Wed May 23, 2018 9:34 am

Try adding this to php.ini (should be a file in the root of your server, if not create it) :

Code: Select all

allow_url_fopen = ON
allow_url_include = ON
If it doesn't work, try adding this to the beggining of your index.php (and admin/index.php) :

Code: Select all

ini_set("allow_url_fopen", 1);
If none of the above works, contact your hosting company if they are willing to change that. If everything failed, contact a developer.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by ozstar » Wed May 23, 2018 10:02 am

Thank you..Will give that a go.

Active Member

Posts

Joined
Fri Mar 09, 2012 7:47 am
Location - Sydney OZ

Post by ozstar » Wed May 23, 2018 3:27 pm

Hi,

I tried those additions to php.ini and the indexes but still got the same message.

Code: Select all

Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/laybuy/public_html/catalog/controller/extension/captcha/google.php on line 27Warning: file_get_contents(https://www.google.com/recaptcha 
and

Code: Select all

 failed to open stream: no suitable wrapper could be found in /home/laybuy/public_html/catalog/controller/extension/captcha/google.php on line 27
Contacted Journal Theme support and they said it was nothing to do with the theme and it looked like a php problem.

I did see on the Google Captcha page to add these, but can't find the HTML file to add to and the form file.

Code: Select all

Paste this snippet before the closing </head> tag on your HTML template:
<script src='https://www.google.com/recaptcha/api.js'></script>
Paste this snippet at the end of the <form> where you want the reCAPTCHA widget to appear:
<div class="g-recaptcha" data-sitekey="6LdvkVoUAAAAAJ31wsqEfXQXcJ6_1WuRQ0vJKu4s"></div>

Active Member

Posts

Joined
Fri Mar 09, 2012 7:47 am
Location - Sydney OZ

Post by yodapt » Wed May 23, 2018 4:43 pm

Either you contact your host about allowing allow_url_fopen on PHP, or contact a developer to fix that for you. If your host is shared, odds are they will not comply.

Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com


User avatar
Active Member

Posts

Joined
Fri Jun 17, 2011 6:39 pm


Post by ozstar » Wed May 23, 2018 5:47 pm

Hi,

That is already in.

See here on both root and admin files.

php.ini - root

Code: Select all

session.cookie_httponly = On;
session.gc_maxlifetime = 172800;
allow_url_fopen = on;
;display_errors = 1;
;error_reporting = E_ALL;

in admin

Code: Select all

session.use_cookies = On;
session.use_trans_sid = Off;
session.gc_maxlifetime = 12000000;
allow_url_fopen = on;
This is line 27 on google.php

Code: Select all

$recaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($this->config->get('captcha_google_secret')) . '&response=' . $this->request->post['g-recaptcha-response'] . '&remoteip=' . $this->request->server['REMOTE_ADDR']);
There must be something else, causing the error, yes? ???

Thanks for the help.

Active Member

Posts

Joined
Fri Mar 09, 2012 7:47 am
Location - Sydney OZ

Post by ocguru » Wed May 23, 2018 7:40 pm

Hi,
The issue is most shared hosting not allow to use file_get_contents function and this will be Disabled on your server too.
So you have to use CURL instead of file_get_contents().
Thanks

Regards,
OCGURU
Opencart Developer - View All Extensions
Contact Me - outputwebtech@gmail.com


User avatar
New member

Posts

Joined
Sat Jan 03, 2015 5:09 pm
Location - India

Post by ozstar » Wed May 23, 2018 9:45 pm

Thank you guys. Problem Solved

It seems it was a server side problem. Here from my host support.

Code: Select all

I've gone ahead and enabled allow_open_furl in your PHP options.
Looking at it your PHP version was set to native on our end not enabling us to use CloudLinux's PHP settings editor.
After testing your site seems to run find on PHP 5.6, and the allow_url_fopen option is set to On within it by default.

Active Member

Posts

Joined
Fri Mar 09, 2012 7:47 am
Location - Sydney OZ

Post by cahb52 » Sun Oct 28, 2018 11:08 am

hi, i have the same problem, but in php info shows allow_url_fopen is on, for me google recaptcha works fine, but when i try to install any extension this fails for the same error.
Sorry for my english but i'm a native spanish.

Newbie

Posts

Joined
Wed May 16, 2018 11:43 pm
Who is online

Users browsing this forum: goodguyssigns, nightfox and 26 guests