Jump to content
Sign in to follow this  
misse

Problems With Verification Image

Recommended Posts

am trying to use CAPTCHA code for verification image in a registration page on my localhost using wamp server, i tried several codes to do this, everytime i try one the verification image doesn't appear at all !! my class mates told me that CAPTCHA doesn not work with wamp & localhost. does anyone has a suggestion for another ver. image code that works with wamp and localhost???Thanks in advance :)

Share this post


Link to post
Share on other sites

There's no reason why a given piece of code would work on a WAN server vs a LAN server, assuming you have the correct software installed. Do you have the GD extension for PHP enabled? GD will probably be required to use a captcha class that generates its own images. If you don't know, create a page with this and run it:

<?phpphpinfo();?>

Scroll down and look for a section titled GD or GD2. If it's enabled, you'll see it listed there. If it's not enabled, that's probably the reason.You can also enable error logging and look for error messages. If PHP has an error it doesn't just silently fail and stop, it tells you what the problem is.error_reporting(E_ALL);ini_set('error_log', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'error.log');ini_set('html_errors', 0);ini_set('log_errors', 1);ini_set('display_errors', 0);You'll find errors inside the error.log file in the same directory as the script with that code.

Share this post


Link to post
Share on other sites

If GD was included with PHP (I'm not sure if WAMP includes GD or not), then you can open the configuration file and find the area where it lists the available extensions. If the GD extension is disabled with a semicolon, you remove the semicolon. e.g., change this:;extension=php_gd2.dlltoextension=php_gd2.dllYou may need to restart Apache after you change the configuration file. http://www.php.net/manual/en/configuration.file.phpStep 1 should really be to look for error messages though, before changing PHP's configuration.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...