forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Mon Dec 11, 2017 7:07 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun Jul 11, 2010 12:55 am 
Offline

Joined: Sun Jul 11, 2010 12:52 am
Posts: 10
PLEASE HELP!
I have set up apache with php5, mysql, gd2, and freetype. I have also set up config.php. For some reason, though, when I go to register, the captcha with random lines shows up, but there is absolutely no text. In addition, when I try to validate with a random captcha and my email, it just takes me back to the registration page without saying anything, rather than telling me it's the wrong captcha. What am I doing wrong??? Thanks in advance.

EDIT: I just wanted to add that I have checked GD and FreeType using phpinfo(). I know the mysql is working, because I had not given the webdiplomacy user proper privleges and it failed, but once I fixed that it worked. Apache is set up properly with PHP, because the web pages actually work. I really don't know what I could have done wrong.

-Looterguf


Top
 Profile  
 
PostPosted: Sun Jul 11, 2010 4:11 am 
Offline

Joined: Sun Jul 11, 2010 12:52 am
Posts: 10
Ok. I managed to fix this. For anybody else with the same problem, it turns out that the font specified for the captcha in easycaptcha.php needs to have an absolute path. Changing that solved the problem. I now am having errors with the emailing, but I think I can fix those.


Top
 Profile  
 
PostPosted: Sun Jul 11, 2010 6:13 am 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Weird, I don't think you're the only one to experience this, but I'm not sure why it happens for some and not others, and why it doesn't occur in other filesystem functions

Glad you resolved it though


Top
 Profile  
 
PostPosted: Sun Jul 11, 2010 2:00 pm 
Offline

Joined: Sun Jul 11, 2010 12:52 am
Posts: 10
I think it might be because some people have the PATH variable set to point to their fonts directory whereas others don't, depending on what OS they're running. Just a conjecture though, so don't take my word on this matter.


Top
 Profile  
 
PostPosted: Sun Jul 11, 2010 2:30 pm 
Offline

Joined: Sun Jul 11, 2010 12:52 am
Posts: 10
I also wanted to describe my experience getting the register.php page to work. What was happening was that when I entered both the CAPTCHA text and my email, it would simply take me back to the captcha part, without saying anything. The problem was that my php.ini file was configured so that the $_REQUEST variable only drew from $_POST and $_GET, but not cookie. Thus, when it did isset($_REQUEST['imageToken']), it returned FALSE where it should have returned true. Modifying the request_order directive in php.ini and restarting apache solved the issue.


Top
 Profile  
 
PostPosted: Sun Jul 11, 2010 3:57 pm 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Interesting, I wasn't aware $_COOKIE could optionally be excluded from $_REQUEST.. PHP is baffling at times, well done on figuring it out


Top
 Profile  
 
PostPosted: Fri Jul 16, 2010 4:59 pm 
Offline

Joined: Wed Oct 08, 2008 12:47 pm
Posts: 726
I would say the issue is not with php, but with the wide variety of default set-ups it can be found with.


Top
 Profile  
 
PostPosted: Sat Jul 17, 2010 8:04 am 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Not sure why Zend would make it configurable, but nevermind


Top
 Profile  
 
PostPosted: Sun Dec 25, 2011 8:53 am 
Offline

Joined: Sat Mar 28, 2009 7:13 am
Posts: 185
kestasjk wrote:
Interesting, I wasn't aware $_COOKIE could optionally be excluded from $_REQUEST.. PHP is baffling at times, well done on figuring it out
I just got webdip up and running on my windows PC today and ran into this same issue. I couldn't figure out why the code expected the cookie to be in $_REQUEST but it wasn't there. But then I found a key piece of information on this page: http://php.net/manual/en/reserved.variables.request.php

Quote:
The default php.ini on your system as of in PHP 5.3.0 may exclude cookies from $_REQUEST. The request_order ini directive specifies what goes in the $_REQUEST array; if that does not exist, then the variables_order directive does. Your distribution's php.ini may exclude cookies by default, so beware.


So I went and looked at my php.ini and the request_order only had GP not GPC. What I now ask myself is why did they decide to make this change at 5.3.0? Is it better to be that way and have the code check $_COOKIE instead of $_REQUEST? I'm new PHP so have no idea. For now I'll set it to GPC so cookies are included.

In trying to troubleshoot this, I did change register.php a little bit.

I changed this:
Code:
if (isset($_REQUEST['imageToken']) && isset($_REQUEST['imageText']) && isset($_REQUEST['emailValidate']) )

to this:
Code:
if ( isset($_REQUEST['imageText']) && isset($_REQUEST['emailValidate']) )

and then added the following within the try:
Code:
        if (! isset($_REQUEST['imageToken']) )
        {
         throw new Exception("imageToken missing");
        }


Just thought I'd throw this out there as a minor tweak that might help others down the road. The exception message could certainly be more detailed.


Top
 Profile  
 
PostPosted: Tue Dec 27, 2011 6:20 am 
Offline

Joined: Tue Dec 27, 2011 6:13 am
Posts: 1
I am having this problem as a user (or user wannabee) as are two friends of mine. We cannot register on webdiplomacy.net because captcha has no text so we cannot be verified as users when we try to register. Whom do I ask at webdiplomacy.net about fixing this problem?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group