[solved]recaptcha warning: failed to open stream, code block

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
FCazabon
Forum Members
Forum Members
Posts: 165
Joined: Fri Nov 07, 2008 5:28 pm

[solved]recaptcha warning: failed to open stream, code block

Post by FCazabon »

Hi, a client recently pointed out a error on a contact us form on their site. When the form is submitted this warning gets displayed and the form does not get submitted:

Code: Select all

Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=[removed]=[removed].223.204&v=php_1.0&response=03AHJ_V[removed]: failed to open stream: Permission denied in /home/www/pavitt.com/modules/Captcha/lib/recaptcha-php/recaptchalib.php on line 94 
I do not understand what the problem could be.

Any ideas?
Last edited by FCazabon on Tue Aug 18, 2015 2:01 pm, edited 2 times in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: recaptcha warning: failed to open stream, code block

Post by Dr.CSS »

It helps if you tell/show what versions of what you are using, it seems like you may need to go to the recaptcha home page to get new keys to use it...
FCazabon
Forum Members
Forum Members
Posts: 165
Joined: Fri Nov 07, 2008 5:28 pm

Re: recaptcha warning: failed to open stream, code block

Post by FCazabon »

Thanks, I deleted my google recaptcha key and re-created it, changed the site key and secret keys in CMSM and it has worked.

I wonder why it stopped working. Might Google have changed something?

Sorry about not posting the version details:

----------------------------------------------
Cms Version: 1.11.13
Installed Modules:
CMSMailer: 5.2.2
CMSPrinting: 1.0.5
FileManager: 1.4.5
MenuManager: 1.8.6
MicroTiny: 1.2.9
ModuleManager: 1.5.8
News: 2.15
Search: 1.7.12
ThemeManager: 1.1.8
Album: 1.10.3
FormBuilder: 0.8.1.1
Captcha: 0.5.2
Gallery: 2.0.1
CGSimpleSmarty: 1.7.4
CGExtensions: 1.45
Banners: 2.7
Showtime: 3.4

Config Information:
php_memory_limit:
process_whole_template:
max_upload_size: 10000000
url_rewriting: none
page_extension:
query_var: page
image_manipulation_prog: GD
auto_alias_content: true
locale:
default_encoding: utf-8
admin_encoding: utf-8
set_names: true

Php Information:
phpversion: 5.4.39
md5_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_STRICT: 2048
E_DEPRECATED: 8192
memory_limit: 128M
max_execution_time: 60
output_buffering: 4096
safe_mode: Off (False)
file_uploads: On (True)
post_max_size: 10M
upload_max_filesize: 10M
session_save_path: /tmp (1777)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)

Server Information:
Server Api: cgi-fcgi
Server Db Type: MySQL (mysqli)
Server Db Version: 5.5.38
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable
Server Time Diff: No filesystem time difference found

----------------------------------------------
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: recaptcha warning: failed to open stream, code block

Post by Dr.CSS »

Maybe because it uses the newest recaptcha API...
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: recaptcha warning: failed to open stream, code block

Post by Jo Morg »

FCazabon wrote:I wonder why it stopped working. Might Google have changed something?
Dr.CSS wrote:Maybe because it uses the newest recaptcha API...
Yeah, as DrCSS suggested, the module has been updated to use the new reCaptcha API (which is less annoying to users, has improved useability and apparently is more effective against bots). It is mentioned on the changelog, on the help page of the module and on the forge, that one is not compatible with the other, needing new authentication keys. The old API is still supported by Google, but it is recommended to use the new one.
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
FCazabon
Forum Members
Forum Members
Posts: 165
Joined: Fri Nov 07, 2008 5:28 pm

Re: recaptcha warning: failed to open stream, code block

Post by FCazabon »

Thanks, but I'm still not quite understanding what happened. I didn't change anything on my site, so I guess it is that Google updated things?

Sorry for being slow on the uptake here.
User avatar
Jo Morg
Dev Team Member
Dev Team Member
Posts: 1978
Joined: Mon Jan 29, 2007 4:47 pm

Re: recaptcha warning: failed to open stream, code block

Post by Jo Morg »

FCazabon wrote: I didn't change anything on my site, so I guess it is that Google updated things?
Someone must have upgraded Captcha to version 0.5.2. Assuming that you had previously version 0.5 or older, which were compatible with reCaptcha API 1.x, the moment you upgraded the module to 0.5.2 the reCaptcha library stopped working since the interface with the Google reCaptcha API is different for each version. You should have upgraded and generated new keys (these now for API 2.0) immediately after.

If it wasn't you who did the upgrade, someone did...
"There are 10 types of people in this world, those who understand binary... and those who don't."
* by the way: English is NOT my native language (sorry for any mistakes...).
Code of Condut | CMSMS Docs | Help Support CMSMS
My developer Page on the Forge
GeekMoot 2015 in Ghent, Belgium: I was there!
GeekMoot 2016 in Leicester, UK: I was there!
DevMoot 2023 in Cynwyd, Wales: I was there!
FCazabon
Forum Members
Forum Members
Posts: 165
Joined: Fri Nov 07, 2008 5:28 pm

Re: recaptcha warning: failed to open stream, code block

Post by FCazabon »

OK, thanks. Maybe I upgraded it some time ago and forgot and nobody noticed it broke anything until now.
Locked

Return to “Modules/Add-Ons”