Hello,
I have a form set up in two Joomla v1.5 installations both with ChronoForms_V3.1_RC5.5 on the same (dedicated) server.
domain configuration examples are:
at: testserver.mydomain.com
and at: mydomain.com
the form works perfectly on the testserver, however on the main "live" server the ReCaptcha plugin is trying to redeclare the class ReCaptchaResponse so cf_recaptcha.php is getting called twice and the form fails...
I checked all the Joomla global configuration settings. If I change Session Settings to none (from Database) that has no effect. I've tried to:
1. change API keys in the ReCaptcha plugin,
2. turn off and on the ReCaptcha plugin,
3. uninstall chronoforms, then reinstall and reconfigure the form from empty,
4. starting with a blank form and only inserting the {ReCaptcha}
5. enable and then disable Use Image verification in the antispam settings
6. I have searched through the php files on the server in an effort to locate the problem, however I don't feel like I understand what is being included from where.
all of these lead to the same result:
Fatal error: Cannot redeclare class ReCaptchaResponse
I have regressed and setup the default chronoforms captcha which seems to work, however the interface is not comparable to ReCaptcha so if there is anyway that I can get this to work, that is my goal...
Thank you for your time,
Lonie
I have a form set up in two Joomla v1.5 installations both with ChronoForms_V3.1_RC5.5 on the same (dedicated) server.
domain configuration examples are:
at: testserver.mydomain.com
and at: mydomain.com
the form works perfectly on the testserver, however on the main "live" server the ReCaptcha plugin is trying to redeclare the class ReCaptchaResponse so cf_recaptcha.php is getting called twice and the form fails...
I checked all the Joomla global configuration settings. If I change Session Settings to none (from Database) that has no effect. I've tried to:
1. change API keys in the ReCaptcha plugin,
2. turn off and on the ReCaptcha plugin,
3. uninstall chronoforms, then reinstall and reconfigure the form from empty,
4. starting with a blank form and only inserting the {ReCaptcha}
5. enable and then disable Use Image verification in the antispam settings
6. I have searched through the php files on the server in an effort to locate the problem, however I don't feel like I understand what is being included from where.
all of these lead to the same result:
Fatal error: Cannot redeclare class ReCaptchaResponse
I have regressed and setup the default chronoforms captcha which seems to work, however the interface is not comparable to ReCaptcha so if there is anyway that I can get this to work, that is my goal...
Thank you for your time,
Lonie
Hi Lonie,
Please can you post the complete error message to see if that gives a clue where the second copy is being declared.
I'd expect this only if you had two forms on the same page both using reCaptcha.
Bob
Please can you post the complete error message to see if that gives a clue where the second copy is being declared.
I'd expect this only if you had two forms on the same page both using reCaptcha.
Bob
Fatal error: Cannot redeclare class ReCaptchaResponse in /home/rockroar/public_html/components/com_chronocontact/plugins/cf_recaptcha.php on line 363
Thanks for any help you can offer.
Thanks for any help you can offer.
There are not two forms on the page. Do you have any other ideas what settings in Chronoforms may be causing this? Could there be anything in the configuration files for chronoforms that is including the cf_recaptcha.php twice or causing the form to call ReCaptcha twice?
Hi loniefink,
All a bit odd but please try this. Open up the components/com_chronocontact/plugins/cf_recaptcha.php file in an editor and right at the end replace the exisiting class definition with this one (the new one has two extra lines
Bob
All a bit odd but please try this. Open up the components/com_chronocontact/plugins/cf_recaptcha.php file in an editor and right at the end replace the exisiting class definition with this one (the new one has two extra lines
/**
* A ReCaptchaResponse is returned from recaptcha_check_answer()
*/
if ( !class_exists('ReCaptchaResponse') ) { // add this line
class ReCaptchaResponse {
var $is_valid;
var $error;
}
} // and this line
?>
Bob
I had multiple problems with ReCaptcha, one of them may be interesting for others too:I tried first to set up the ReCaptcha with domain specific Public and Private keys, and that din't worked. When I set up a global key pair, the solution begant to work, for example had no problems with using it in Kunena. But in Chronoforms the above error shownd up. Applying the code above fixed that, but I had a new, weird error.
The form worked - sort of - but the user sees the Recaptcha standared error:
The reCAPTCHA wasn't entered correctly. Go back and try it again
( reCAPTCHA said: incorrect-captcha-sol )
And below the form, with plugin seemingly not applied (text {ReCaptcha} shown), instead the redirect page I have been set up in the form - and wich works correctly withouth the plugin.
Anyone had this problem? and have an ideea on how to fix it?
The form worked - sort of - but the user sees the Recaptcha standared error:
The reCAPTCHA wasn't entered correctly. Go back and try it again
( reCAPTCHA said: incorrect-captcha-sol )
And below the form, with plugin seemingly not applied (text {ReCaptcha} shown), instead the redirect page I have been set up in the form - and wich works correctly withouth the plugin.
Anyone had this problem? and have an ideea on how to fix it?
Hi webglobe,
Please see this post for a fix. I think that this error only occurs if there is more than one ReCaptcha on the same page.
Bob
Please see this post for a fix. I think that this error only occurs if there is more than one ReCaptcha on the same page.
Bob
No, there where no other forms on the same page. I found the problem and fixed it - sort of...😛
The problem was generated, because I needed ReCaptcha on the same site in Kunena too.
And solved it by using a plugin to insert ReCaptcha code. That seemed to conflict with the ChronoForms own plugin implementation. Both where working after I installed the patch you are referring to, but the ChronoForm powered forms began to behave as I described in the original post.
I disabled the other, Joomla-wide plugin, and Chronoforms behaved normally.
But because I needed the ReCaptcha on both places, I kicked off the ReCaptcha plugin from Chronoforms entirely - by disabling it on the forms, and later renaming the plugin.s php file as you suggested in another form - and inserted in the ChronoForm forms the same plugin code I used in Kunena.
Now everything is working, and I guess you should be aware of the problem - others may have similar problems!
I wish I got to work your solution, and to have the Kunena have ReCaptcha too, but the lack of time (and funding) stopped me to dig further.
The problem was generated, because I needed ReCaptcha on the same site in Kunena too.
And solved it by using a plugin to insert ReCaptcha code. That seemed to conflict with the ChronoForms own plugin implementation. Both where working after I installed the patch you are referring to, but the ChronoForm powered forms began to behave as I described in the original post.
I disabled the other, Joomla-wide plugin, and Chronoforms behaved normally.
But because I needed the ReCaptcha on both places, I kicked off the ReCaptcha plugin from Chronoforms entirely - by disabling it on the forms, and later renaming the plugin.s php file as you suggested in another form - and inserted in the ChronoForm forms the same plugin code I used in Kunena.
Now everything is working, and I guess you should be aware of the problem - others may have similar problems!
I wish I got to work your solution, and to have the Kunena have ReCaptcha too, but the lack of time (and funding) stopped me to dig further.
Hi webgobe,
Thanks for the info. We should probably rename the class in ChronoForms, I think that would prevent the name conflict with other users.
Bob
Thanks for the info. We should probably rename the class in ChronoForms, I think that would prevent the name conflict with other users.
Bob
This topic is locked and no more replies can be posted.