php session_start() issues for php captcha

I was going nuts (banging my head on my desk) because I just couldn’t figure out why session variables weren’t being stored after submitting a form with php captcha (http://www.phpcaptcha.org).  I looked through the settings, http headers, check my validation code, almost everything just for a simple form to submit after a user enters the CORRECT captcha code.  One item I did not check was the folder to where the php sessions were configured to be saved to.  The default is something similar to /var/lib/php/session but because the directory didn’t exist, the sessions weren’t being saved.  I give much thanks to my hosting provider for figuring this out.  Be sure that the folder is writable and readable for the correct user and/or group.

  • Share/Bookmark

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically each day to your feed reader.

No comments yet.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

(required)

(required)