Jump to content
Ch 11 - Captcha
3 replies to this topic
Posted 11 March 2011 - 02:32 AM
I could need some help with my very first captcha I ever tried to make.
I just tried to make running the code that's given in chapter 11, page 623, in the php and mysql book. But there's an error occurring. This is the feedback I get:
Fatal error: Call to undefined function SHA() in C:\Programme\xampp\htdocs\tom_2011-03-08\captcha.php on line 16
Line 16 is this one in the code:
$_SESSION['pass_phrase'] = SHA($pass_phrase);
Please ask me if you need the entire code from this lesson to find out where the problem is.
It would be great to get help.
Posted 11 March 2011 - 06:12 AM
i used the following in my script, I thought the book had the same. How old is your book?
$_SESSION['pass_phrase'] = sha1($pass_phrase);
Posted 24 September 2014 - 09:02 PM
It's an error,you should see the book.
the book tells us we should use sha1 not sha
$_SESSION['pass_phrase'] = SHA1($pass_phrase);
btw. if you have a high gd version..you should use a relative path for the fonts.
// Draw the pass-phrase string
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users