Captcha Code won't appear!

Permalink
Hi All-

I 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

dihakz
 
Remo replied on at Permalink Reply
Remo
got a link to a phpinfo page on your server?
dihakz replied on at Permalink Reply
dihakz
http://208.11.252.31/phpinfo.php

Let me know what you find!
Mnkras replied on at Permalink Reply
Mnkras
in the /concrete/tools/required overrite the capatch.php with the one from the latest package see if that works.
Mnkras replied on at Permalink Reply
Mnkras
dihakz replied on at Permalink Reply
dihakz
Did the phpinfo page help any? (Is something not configured correctly on the server?)
Tony replied on at Permalink Reply
Tony
i got a similar error a while ago when the font file for the captcha didn't have the correct permissions:

/concrete/libraries/3rdparty/securimage/elephant.ttf
dihakz replied on at Permalink Reply
dihakz
tried that! permissions are 755... what should they be?
Remo replied on at Permalink Reply
Remo
depends on your configuration.

try 777 - this is usually a bit too open but it lets you know whether this is an issue or not
dihakz replied on at Permalink Reply
dihakz
no go :( -- seems like this should be something simple! no clue why it won't work.
Remo replied on at Permalink Reply
Remo
okay, it's getting ugly

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?
dihakz replied on at Permalink Reply
dihakz
Remo replied on at Permalink Reply
Remo
sorry, I'm running out of ideas.. Would probably have to debug this problem on my own but I'll sleep over it, I might have more ideas in the morning.
dihakz replied on at Permalink Reply
dihakz
Anyone have any new ideas? I'm at a complete loss, and have to figure something out!

Thanks!!
10010110 replied on at Permalink Reply
Hmm, I have a similar problem and somehow I have the feeling that it’s looking down the wrong path.

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!
10010110 replied on at Permalink Reply
OK, here’s what I’ve found out in the meantime:

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.
exicris replied on at Permalink Reply
I appreciate the effort you undertook to track this issue down. I am glad that solution worked for you, however, through the same routes you took, I have arrived at a solid dead end.

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...
zoinks replied on at Permalink Reply
Pretty weird... I moved a site and I have a CAPTCHA code working on one page, but not on another.

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.
EightDJ replied on at Permalink Reply
I'd say the most likely reason is that you don't have either GD lib or Freetype or both installed with your PHP build...

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/...