Captcha Code won't appear!
PermalinkI am having trouble with this page:http://ohiovalleyhospital.org/job-and-volunteer-opportunities/apply...
The captcha code won't appear. I have tried removing it and then putting it back in. IE6- IE8 don't see it, nor does Safari & FireFox.
Can anyone help?
Thanks a million-
Vanessa

Let me know what you find!
http://www.concrete5.org/index.php/tools/required/captcha... you get the image
http://www.ohiovalleyhospital.org/index.php/tools/required/captcha... you get nothing ill look into this
/concrete/libraries/3rdparty/securimage/elephant.ttf
try 777 - this is usually a bit too open but it lets you know whether this is an issue or not
concrete/tools/captcha.php, add this (you might have to replace two lines)
ini_set('display_errors', 'on'); error_reporting(E_ALL);
in concrete/libraries/3rdparty/securimage/securimage.php, comment all lines like this:
header("Content-Typ...
if you then open the img url (see message of mnkras), do you see any errors?
Thanks!!
1.) There is an example form in /concrete/libraries/3rdparty/securimage which displays the image fine.
2.) I don’t have any directory called “required” in the tools directory, neither in the concrete section nor in the user section. The captcha.php is directly in the tools directory, yet, the image path in the src attribute shows “/tools/required/captcha?nocache=1234567890“. So apparently it’s looking in “required”.
3.) Manually creating a “required” directory and putting captcha.php in there just does nothing, it just gives a blank page. It doesn’t even show me the error message I used to get before (“image can’t be displayed because it contains errors”).
I haven’t found the cause of the issue yet. But maybe this helps in the process? Please, I’m desperate!
Thanks to the helpful people in the chat the problem appears to be the path to a file called words.txt. I don’t know where this file is as it doesn’t show up anywhere (we speculated that it might be a dynamically created file, although there’s also nothing in the database that could be related to it) but securimage.php (in /concrete/libraries/3rdparty/securimage) is looking for it.
When I moved my installation of Concrete5 one level up (to the root directory) somehow it kept the path to that ominous words.txt file as it was, thus, breaking the CAPTCHA image because it can’t find the file anymore to create the code from. Strangely it does work when I move the CMS back to the subdirectory. So, in a nutshell: What I eventually did was open securimage.php and change line 135:
var $use_wordlist = true;
from “true” to “false”. Above that line is the path to the word file but since I have no idea where that file actually is I didn’t change it.
So, now it generates a random code which is also fine for me. I haven’t quite understood why this issue occurs but I’ve solved it for now. I’d still like some clarification by the core developers, though.
Additionally, in securimage.php on line 111 you can specify how many characters the CAPTCHA image should contain:
var $code_length = 4;
I’ve changed it from 4 to 5 but I guess any value is acceptable.
I also found other places in the forums referring to switching to the gd fonts rather than using the ttf font, permissions, etc.. and none of it has worked.
Did you ever get an answer from the folks at the core regarding this?
What is most frustrating to me is this code worked on my dev server, it works in other sites on the same server, and DID work on this site for 3 weeks...
It seems to be looking for and pointing to things that don't exist, similar to what is stated above. The difference is that mine seems to be utilizing a path of:
index.php/tools/required/captcha?nocache-1314999800
...and there is no "required" directory in ANY tools directory (not in [root]/tools, nor in concrete/tools so this is purely imaginary as far as I can tell.
Check phpinfo() - if you don't see anything to do with GD lib or Freetype - Captcha won't work.
You'll probably need to recompile your PHP build with the required libraries. Here's a hand guide:http://justinhileman.info/article/reinstalling-php-on-mac-os-x/...