I was getting the same error.
I looked around config.php and found the following line:
$public = 'publicy';
The variables that were declared around $public all had a dollar sign inside the single quotes, so I changed the line likewise to:
$public = '$publicy';
The captcha worked fine for me after that.
Hope this helps someone!
Rich