Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Location
    Washington
    Posts
    223
    Thanks
    34
    Thanked 0 Times in 0 Posts

    Captcha not displaying

    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.
    Last edited by cosmicsea; 01-23-2010 at 10:24 PM.

  • #2
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    Remove the header( line and see what it outputs. I'm guessing there is an error of some kind being echo'd out
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)

  • #3
    Regular Coder
    Join Date
    Jan 2010
    Location
    Washington
    Posts
    223
    Thanks
    34
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by JAY6390 View Post
    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

  • #4
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    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
    PHP Code:
    error_reporting(0); 
    at the top of the script
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)

  • #5
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    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
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)

  • #6
    Regular Coder
    Join Date
    Jan 2010
    Location
    Washington
    Posts
    223
    Thanks
    34
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by JAY6390 View Post
    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
    PHP Code:
    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?

  • #7
    Regular Coder
    Join Date
    Jan 2010
    Location
    Washington
    Posts
    223
    Thanks
    34
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by JAY6390 View Post
    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?

  • #8
    Regular Coder
    Join Date
    Dec 2009
    Location
    UK
    Posts
    495
    Thanks
    0
    Thanked 58 Times in 58 Posts
    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
    My site: JayGilford.com
    Resources:
    PHP Pagination Class | Getting all page links | Handling PHP Errors properly
    If you like a users help, show your appreciation with the rep and thanks buttons :)

  • Users who have thanked JAY6390 for this post:

    cosmicsea (01-23-2010)

  • #9
    Regular Coder
    Join Date
    Jan 2010
    Location
    Washington
    Posts
    223
    Thanks
    34
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by JAY6390 View Post
    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!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •