...

View Full Version : Resolved Captcha not displaying



cosmicsea
01-23-2010, 07:49 PM
I have a captcha i am using and it wont show up and when i go directly to the captcha http://domain.com/utils/captcha.php it says the image cannot be displayed because it contains errors. Can somebody look at my captcha and see if you can see why it wont work? Thanks. [PHP]<?php

I dont understand why it wont work, it worked fine on my last server and then i moved to a new server and it hasnt worked since.

JAY6390
01-23-2010, 07:59 PM
Remove the header( line and see what it outputs. I'm guessing there is an error of some kind being echo'd out

cosmicsea
01-23-2010, 08:06 PM
Remove the header( line and see what it outputs. I'm guessing there is an error of some kind being echo'd out

after doing that i get the error
Warning: unlink(./images/tmp/7a46caf1a476e7afa6b97b73e36f17ba.png) [function.unlink]: No such file or directory in /home/public_html/domain.com/public/utils/captcha.php on line 61

JAY6390
01-23-2010, 08:16 PM
so it's trying to delete a file that doesn't exist. You can either put the header line back and remove the delete one, or simply suppress all errors by putting

error_reporting(0);
at the top of the script

JAY6390
01-23-2010, 08:19 PM
Note that it actually sounds like the convert command isn't executing correctly either, since it's not generating the file. Check with your hosting provider to ensure you are allowed to use the convert keyword and also if you're using the proper usage

cosmicsea
01-23-2010, 08:24 PM
so it's trying to delete a file that doesn't exist. You can either put the header line back and remove the delete one, or simply suppress all errors by putting

error_reporting(0);
at the top of the script

well im not sure what is going on, I tried all of that and it still doesn't work. I dont understand why it wont work after server move cause all directories etc are the same and server is setup the same. Do you have any other suggestions?

cosmicsea
01-23-2010, 08:28 PM
Note that it actually sounds like the convert command isn't executing correctly either, since it's not generating the file. Check with your hosting provider to ensure you are allowed to use the convert keyword and also if you're using the proper usage

I can use whatever I want, I run an unmanaged vps with ubuntu. is there anything i can do to see what it is doing? like will this show up in any error logs?

JAY6390
01-23-2010, 08:58 PM
Well I know it's not what you want exactly, but it would be far easier to just use recaptcha for this. I would suggest allowing your errors to show again, and removing the @ in front of the exec command, to see if that is bringing up any errors

cosmicsea
01-23-2010, 11:24 PM
Well I know it's not what you want exactly, but it would be far easier to just use recaptcha for this. I would suggest allowing your errors to show again, and removing the @ in front of the exec command, to see if that is bringing up any errors

I guess i will try a different captcha. i just wanted to use this one lol. thanks for your help though, its much appreciated!:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum