...

View Full Version : Contact form captcha FG_CaptchaHandler error



ska_defender
08-19-2012, 03:52 AM
I have setup a contact form from

http://www.html-form-guide.com/contact-form/php-contact-form-tutorial.html

After setting on my server I am getting error

Fatal error: Class 'FG_CaptchaHandler' not found in captcha-creator.php on line 3

line 3

class FGCaptchaCreator extends FG_CaptchaHandler


It works fine on other host

I guess it might be some hosting problem but cant figure out it

Fou-Lu
08-19-2012, 06:23 AM
Its not a hosting issue, but it could be a configuration difference relating to the autoloads.

The issue itself is simply that you cannot extend a non-existing class. The system cannot find the class FG_CaptchaHandler. Make sure that you have provided the path to the file to require, or that you have properly registered the path for the spl_autoload registers.

AndrewGSW
08-19-2012, 06:28 AM
If you copied it exactly then this


require_once("./include/fgcontactform.php");

is looking for the file in the sub-directory 'include' from your root directory. Is it saved in this location?

But that file also requires class.phpmailer.php. Did you download this file to the include folder as well?

And have you uploaded these files?

ska_defender
08-19-2012, 09:19 AM
@ AndrewGSW
Yes its exactly saved in this location and include folder has " class.phpmailer.php" too

ska_defender
08-19-2012, 09:26 AM
Its not a hosting issue, but it could be a configuration difference relating to the autoloads.

The issue itself is simply that you cannot extend a non-existing class. The system cannot find the class FG_CaptchaHandler. Make sure that you have provided the path to the file to require, or that you have properly registered the path for the spl_autoload registers.

how do I register the path for the spl_autoload registers ?

ska_defender
08-19-2012, 09:30 AM
Is there a way I could disable captcha from this form ?

AndrewGSW
08-19-2012, 01:11 PM
Is there a way I could disable captcha from this form ?

The page you initially referenced has an example form without the captcha.

ska_defender
08-19-2012, 02:41 PM
If you scroll below you will find " Contact form that emails based on a condition"

this one

http://www.html-form-guide.com/files/contact-form/file-upload-2/contactform.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum