Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - captcha not verifying entry
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedcaptcha not verifying entry

 Post Reply Post Reply Page  12>
Author
nakdtree View Drop Down
Newbie
Newbie


Joined: 22 August 2006
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote nakdtree Quote  Post ReplyReply Direct Link To This Post Topic: captcha not verifying entry
    Posted: 23 August 2006 at 1:27pm

I can't get the web wiz captcha to verify the entry.

This is my form handler.

 

<!-- Include file for CAPTCHA form processing -->            
<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->


<%


If blnCAPTCHAcodeCorrect = True Then
            Response.Write(" CAPTCHA code is correct")
Elseif  blnCAPTCHAcodeCorrect = False Then
            Response.Write(" CAPTCHA code is NOT correct")
            Response.Write("<a href=""javascript:history.back(1)"">Click here to amend</a>")         
End if


Dim landing_page, host_url
Dim fso, outfile, filename, dirname, myFolder
Dim req_method, key, value
Dim bErr, errStr, bEmpty
On Error resume next
bErr = false
bEmpty = true
errStr = ""
Set fso = Server.CreateObject("Scripting.FileSystemObject")
host_url = Request.ServerVariables("HTTP_HOST")
req_method = Request.ServerVariables("REQUEST_METHOD")
dtNow = Now()
filename = Server.MapPath("ssfm")
dirname = filename
filename = filename & "/gdform_" & DatePart("M", dtNow) & DatePart("D", dtNow) & DatePart("YYYY", dtNow) & DatePart("N", dtNow) & DatePart("S", dtNow)

Function FormatVariableLine(byval var_name, byVal var_value)
 Dim tmpStr
 tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " START>" & vbCRLF
 tmpStr = tmpStr & var_value & vbCRLF
 tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " END>"
 FormatVariableLine = tmpStr
end function


Sub OutputLine(byVal line)
   outfile.WriteLine(line)
end sub

if err.number = 0 then
 Set outfile = fso.CreateTextFile(filename, true, false)
 if err.number <> 0 then
   bErr = true
   errStr = "Error creating file! Directory may not be writable or may not exist.<br>Unable to process request."
 else
  if(req_method = "GET") then
   for each Item in request.QueryString
    if item <> "" then
     bEmpty = false
     key = item
     value = Request.QueryString(item)
     if(lcase(key) = "redirect") then
      landing_page = value
     else
      line = FormatVariableLine(key, value)
      Call OutputLine(line)
     end if
    end if 
   next
  elseif (req_method = "POST") then
   for each Item in request.form
    if item <> "" then
     bEmpty = false
     key = item
     value = Request.form(item)
     if(lcase(key) = "redirect") then
      landing_page = value
     else
      line = FormatVariableLine(key, value)
      Call OutputLine(line)
     end if
    end if 
   next
  end if
  outfile.close
 end if 
 if(bEmpty = true) AND errStr = "" then
  bErr = true
  errStr = errStr & "<br>No variables sent to form! Unable to process request."
 end if
 if(bErr = false) then 
  if (landing_page <> "") then
   response.Redirect "http://" & host_url & "/" & landing_page
  else
   response.Redirect "http://" & host_url 
  end if
 else
  Response.Write errStr
 end if 
 set fso = nothing
else
  Response.Write " An Error Occurred creating mail message. Unable to process form request at this time."
end if
%>

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2006 at 1:33pm
There is nothing apparently wrong, you'll just have to keep messing till you get it right.
Back to Top
nakdtree View Drop Down
Newbie
Newbie


Joined: 22 August 2006
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote nakdtree Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2006 at 1:42pm
I don't know what else to do.
Back to Top
nakdtree View Drop Down
Newbie
Newbie


Joined: 22 August 2006
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote nakdtree Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2006 at 6:41pm
I have put the code in every concievable spot...  I just don't know what else to look for, look at...  I just cant get the validator to work
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2006 at 6:53pm
Try doing some debugging putting in the following to test to see if the variable for testing the CAPTCHA code is entered it actually set.

Response.Write(blnCAPTCHAcodeCorrect)
Back to Top
nakdtree View Drop Down
Newbie
Newbie


Joined: 22 August 2006
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote nakdtree Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2006 at 7:44pm
I put it here...
 
<!-- Include file for CAPTCHA form processing -->            
<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->

<%
If blnCAPTCHAcodeCorrect = True Then
   Response.Write(" CAPTCHA code is correct")
   Response.Write(blnCAPTCHAcodeCorrect)
  ElseIf  blnCAPTCHAcodeCorrect = False Then
   Response.Write(" CAPTCHA code is NOT correct")
   Response.Write(blnCAPTCHAcodeCorrect)
  End If
 
Dim landing_page, host_url
Dim fso, outfile, filename, dirname, myFolder
Dim req_method, key, value
Dim bErr, errStr, bEmpty
On Error resume next
bErr = false
bEmpty = true
errStr = ""
Set fso = Server.CreateObject("Scripting.FileSystemObject")
host_url = Request.ServerVariables("HTTP_HOST")
req_method = Request.ServerVariables("REQUEST_METHOD")
dtNow = Now()
filename = Server.MapPath("ssfm")
dirname = filename
filename = filename & "/gdform_" & DatePart("M", dtNow) & DatePart("D", dtNow) & DatePart("YYYY", dtNow) & DatePart("N", dtNow) & DatePart("S", dtNow)
Function FormatVariableLine(byval var_name, byVal var_value)
 Dim tmpStr
 tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " START>" & vbCRLF
 tmpStr = tmpStr & var_value & vbCRLF
 tmpStr = tmpStr & "<GDFORM_VARIABLE NAME=" & var_name & " END>"
 FormatVariableLine = tmpStr
end function

Sub OutputLine(byVal line)
   outfile.WriteLine(line)
end sub
if err.number = 0 then
 Set outfile = fso.CreateTextFile(filename, true, false)
 if err.number <> 0 then
   bErr = true
   errStr = "Error creating file! Directory may not be writable or may not exist.<br>Unable to process request."
 else 
  if(req_method = "GET") then
   for each Item in request.QueryString
    if item <> "" then
     bEmpty = false
     key = item
     value = Request.QueryString(item)
     if(lcase(key) = "redirect") then
      landing_page = value
     else
      line = FormatVariableLine(key, value)
      Call OutputLine(line)
     end if
    end if 
   next
  elseif (req_method = "POST") then
   for each Item in request.form
    
   if item <> "" then
     bEmpty = false
     key = item
     value = Request.form(item)
     if(lcase(key) = "redirect") then
      landing_page = value
     else
      line = FormatVariableLine(key, value)
      Call OutputLine(line)
   
     end if
    end if 
   next
   
  end if
  
  
  outfile.close
 end if 
 
 if(bEmpty = true) AND errStr = "" then
  bErr = true
  errStr = errStr & "<br>No variables sent to form! Unable to process request."
 end if
 if(bErr = false) then 
  if (landing_page <> "") then
   response.Redirect "file_upload.asp"
  else
   response.Redirect "file_upload.asp"
  end if
 else
  Response.Write errStr
 end if 
 set fso = nothing
else
  Response.Write " An Error Occurred creating mail message. Unable to process form request at this time."
end if

%>
 
The form handler redirects to a page specified by me, so I do not see any results.
 
I don't know anything about this, so modifying the form handler is not something I am familiar with.  I am willing to learn, but I cannot find any information on how to deal with this code that is specific...  at least not speicific enough for me.  Everything is generalized and assumes I know the basics, which I don't. 
 
The form handler is gdform.asp.
 
I have a bunch of forms going through the same handler, I have the captcha on all of them.
Back to Top
nakdtree View Drop Down
Newbie
Newbie


Joined: 22 August 2006
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote nakdtree Quote  Post ReplyReply Direct Link To This Post Posted: 23 August 2006 at 7:58pm
You can see my site at zoezencreations.com...  the captcha shows up just the way it should, changes with every refresh and otherwise appears to function normally, it just doesn't verify if the code entered is correct, nor does it require any code be entered at all.
Back to Top
nakdtree View Drop Down
Newbie
Newbie


Joined: 22 August 2006
Location: United States
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote nakdtree Quote  Post ReplyReply Direct Link To This Post Posted: 25 August 2006 at 1:45pm
I'm still not having any luck with getting my captcha to verify...  any thoughts?
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.