Author Topic: Captcha on contact form not working  (Read 3237 times)

dhottinger

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 2
    • View Profile
Captcha on contact form not working
« on: April 11, 2008, 04:22:40 PM »
Im having a slight problem with the captcha on the contact form not working.  All I get is a generic icon.   
Here is my php error:
 PHP Notice:  Uninitialized string offset:  11 in /home/dhottinger/modules/freecap.php on line 176, referer: http://staff.harrisonburg.k12.va.us/~dhottinger/index.php?pages_id=27&t=contact
[Fri Apr 11 19:18:42 2008] [error] [client 64.203.189.100] PHP Fatal error:  Call to undefined function ImageCreate() in /home/dhottinger/modules/freecap.php on line 185, referer: http://staff.harrisonburg.k12.va.us/~dhottinger/index.php?pages_id=27&t=contact

php version
PHP 5.1.6 (cli) (built: May  9 2007 11:47:50)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Fedora Core 6 apache 2.2.3

gd is installed.  Am I missing something else?

thanks,

ddh

HandsomeWeb

  • SOS Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 85
  • Karma: 2
    • View Profile
    • SOS Webpages
Re: Captcha on contact form not working
« Reply #1 on: April 11, 2008, 04:54:45 PM »
An error with ImageCreate() is most likely a problem related to GD library.  But the image upload requires a newer version of GD than the CAPTCHA, and you seem to have that working.  Add a photo album page and see if it will accept a gif upload or give the same error.  If it gives the same error, then it is a GD lib problem.  If gif upload works, then I'm stumped.

You can always skip the CAPTCHA altogether.  There is a non-CAPTCHA version of the contact form, just do the following:

Rename  includes/contactform.php       includes/contactformCAPTCHA.php
Rename  includes/NOCAPcontactform.php      includes/contactform.php

But remember that on any upgrade, your change will be overwritten.  You'll have to make the switch again.

I, and most people, hate CAPTCHA anyway.  But it is THE deterrent to form SPAM that gets out of control.  In future versions, I may default the other way or change the CAPTCHA, or use less reliable spam avoidance.
Chris
http://www.soswebpages.com
http://www.handsomeweb.com
http://www.handsomewebservices.com

dhottinger

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 2
    • View Profile
Re: Captcha on contact form not working
« Reply #2 on: April 11, 2008, 06:10:34 PM »
Gif upload works fine.  Photo album works good also.  Let me look through my log files a little and see if I see anything else.  I'll post what I find.

ddh

dhottinger

  • Jr. Member
  • **
  • Posts: 10
  • Karma: 2
    • View Profile
Re: Captcha on contact form not working
« Reply #3 on: April 11, 2008, 06:26:01 PM »
upgraded my php-gd package with yum install php-gd and restarted httpd.  works now.   for some reason there was no gd. in my /etc/php.d. 

thanks,

ddh