Captcha Key Generator Not Working



Captcha Key Generator Not Working
  Forums Index
      » PHP Forums
        » » captcha key generator not working
Captcha Key Generator Not Working
Post Description:
Post Tags: captcha, key, generator, not, working
This Post Has Been Viewed 135 Times Since Sat Mar 22, 2008 6:49 pm Posted By php chaptcha generator with 8 replies
Captcha Key Generator Not Working
i have a captcha similar to yours

something weird its happening, for some reason, its not generating a key from the server

when i display the value of $key it shows empty

how were you able to solve this problem.

Leave Your Comments     [ dejar commentarios ]
  * Name     [nombre]

  * eMail (will not be published)     [coreo electronico]

* Enter Your Reply or Comments:    [commentarios]


Add Picture To Comments         [incluir foto]
YES NO             upload
Receive Replies on my Comments (An email will be sent to you when someone replies to your comments)

     

Comments and replies About Captcha Key Generator Not Working




:: 1 :: #46676 - Reply By hostman On Sat Mar 22, 2008 6:50 pm
:: 2 :: #46677 - Reply By erick On Sat Mar 22, 2008 6:50 pm
how about if i dont have my globals setup.. i mean, i dont have access to my server..
:: 3 :: #46678 - Reply By hostman On Sat Mar 22, 2008 6:53 pm
then you need to set it up in your file on the first line

also, make sure you hare putting this at the very top of your page try this first:

put this code at the top of your script
session_start();


if that doesnt work, try the next step

put this code at the top of the page to set global variables from within the script
ini_set('register_globals', true);





:: 4 :: #46679 - Reply By erick On Sat Mar 22, 2008 6:53 pm
i tried that, but its not working
:: 5 :: #46680 - Reply By hostman On Sat Mar 22, 2008 6:57 pm
ok, you last resource to troubleshoot is see what the value of $key is,,, you said earlier that its empty.

so put this at the top of the page or declare $key as $_SESSION['key']

so lets try the first step and compare these two. put this code at the top of your script and give me the output:

PHP CODE:
<?php
echo '$_SESSION[key]: '.$_SESSION['key'].'<br>';
echo '$key: '.$key.'<hr>';
?>
:: 6 :: #46681 - Reply By erick On Sat Mar 22, 2008 6:58 pm
this this the output:

OUTPUT:

$_SESSION[key]: da470
$key:
:: 7 :: #46683 - Reply By hostman On Sat Mar 22, 2008 7:01 pm
ok so when you compare your input with the key, dont user $key, change your code:

FROM:

LINE: 102 if($number!=$key || !$number) {


TO:

LINE: 102 if($number!=$_SESSION['key']|| !$number) {
:: 8 :: #46684 - Reply By erick On Sat Mar 22, 2008 7:03 pm
oh man, thanks..

that worked.

thanks alot.

whewww!!!!