Jump to content


Photo

Captcha probelm


  • Please log in to reply
10 replies to this topic

#1 Tandem

Tandem
  • Members
  • PipPipPip
  • Advanced Member
  • 251 posts

Posted 23 October 2006 - 04:05 PM

Hi, this is prbably a long shot, as i cannot really give a lot of information about this, as i don't really know what the problem is, so i apologize for that in advance.

I've been using a captcha that i found on a tutorial site for a few months now and it's been working great. I can't seem to post the code for it however as everytime that i try, for some reason my session times out :S

So i woke up yesterday to find that my site wouldn't load at all, and an error claiming that mysql_connect was an undefined function, and apparently (according to a friend), it was due to a fedora update, and i had to install php-mysql. This fixed everything, but now all of a sudden my captha only appears as a red x.

I'm pretty inclined to say that this is all connected. Can anyone suggest anything i can do to get this working again?

Thanks in advance if anyone can help me.

#2 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 23 October 2006 - 04:08 PM

Sounds to me like your include paths may have changed with the new install of PHP. Do you have error reporting turned on to assure that all your files are being included properly?
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#3 Tandem

Tandem
  • Members
  • PipPipPip
  • Advanced Member
  • 251 posts

Posted 23 October 2006 - 04:13 PM

I don't have error reporting on. i'm not sure how to put it on as i only have cli access to the server and i'm not too familiar with cli's.

Not sure if it makes a difference, but it uses img tags to be called, like this <img src="captcha.php">. All my other included files work fine though.

#4 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 23 October 2006 - 04:16 PM

I don't have error reporting on. i'm not sure how to put it on as i only have cli access to the server and i'm not too familiar with cli's.

Not sure if it makes a difference, but it uses img tags to be called, like this <img src="captcha.php">. All my other included files work fine though.


And, your "captcha.php" file is in the same directory, correct? It's going to be extremely difficult to help you debug without a little more info. If you hit your captcha.php page directly, do you get an image, or do you get a jpeg error of some sort?
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#5 Tandem

Tandem
  • Members
  • PipPipPip
  • Advanced Member
  • 251 posts

Posted 23 October 2006 - 04:22 PM

Yes, it's in the same directory. If i go directly to it, i get a red cross too. I'm trying to post my code but everytime i do i get "page cannot be displayed" and then a bunch of errors on reload.

While i was googling random things about the subject, i noticed something about GD support. Perhaps maybe that is to do with it?

#6 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 23 October 2006 - 04:24 PM

If you reinstalled PHP and not GDLIb, yes, that definitely would cause a problem. Run a phpinfo() and see if GDLib is installed.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#7 Tandem

Tandem
  • Members
  • PipPipPip
  • Advanced Member
  • 251 posts

Posted 23 October 2006 - 04:32 PM

I can't seem to find whether it is or not. my PHP info is here.

http://217.174.251.128/php.php

also

http://217.174.251.128/captcha.txt

is my captcha code.

#8 MCP

MCP
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 23 October 2006 - 04:47 PM

Yep, you need to reconfigure with gd support. your config line has --without-gd

#9 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 23 October 2006 - 04:49 PM

Nope, you sure don't. If you have GD installed, you'll have an entire table with all the GD settings represented under the heading of, what else, gd.

You'll have settings like GD Support - enabled and GD Version - bundled (2.0.28 compatable) or such.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx

#10 Tandem

Tandem
  • Members
  • PipPipPip
  • Advanced Member
  • 251 posts

Posted 23 October 2006 - 06:02 PM

Ok, how do i go about reconfiguring with gd support?

#11 Tandem

Tandem
  • Members
  • PipPipPip
  • Advanced Member
  • 251 posts

Posted 23 October 2006 - 06:11 PM

Nvm, i googled it.

Thanks for your replies!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users