Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues
Author Message
catweazle
Regular
Regular



Joined: Oct 14, 2006
Posts: 60
Location: Norway

PostPosted: Sun Jan 20, 2008 11:41 pm Reply with quote

Hi All!

I have RavenNuke (v2.10.01) istalled at two of my sites.

Every now and then (quite often actually!) the security code image show only 4 characters (not 5 as it's supposed to). This produces an invalid login which is rather annoying to most users...

Any solution to avoid this happening?

Thanks alot for your time as well as a very great CMS and forum!!
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Mon Jan 21, 2008 12:00 am Reply with quote

catweazle, I have seen that happen occasionally also. This is the first time, to my knowledge, that anyone else has said anything. I will open a ticket on it and we will see if we can figure out why it happens. I'm pretty sure it has to do with the width of the image not calculating correctly but we will look into it. Thanks.
 
View user's profile Send private message
catweazle







PostPosted: Mon Jan 21, 2008 3:38 am Reply with quote

Hi Raven.

Thanks alot for your time and fast replay.

Even though I have set my block-width to 200px the bug still remains.
I also thought it would have to do with the width of the image, and when you tell the very same I'm darn sure it is!! Wink

Just thought I should let you know so you might be able to "kill this bug" before the release of v2.20.00 Smile

Thanks alot to the whole team - Great work!!
 
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Mon Jan 21, 2008 5:11 am Reply with quote

I noticed this behavior only a few times after I updated my standard nuke to RavenNuke
and didnĀ“t saw this behavior again.
The reason I had issues with this could be I had old files on the server. However only 4 characters is very seldom and it looks like that none of my users, 14000 currently, had any issues with the captcha otherwise I would know it.
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon Jan 21, 2008 5:48 am Reply with quote

By chance is your site running on a windows platform? That is the only time that I have noticed a persistent problem. On linux, I've seen it only a few times out of 1000s.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
catweazle







PostPosted: Mon Jan 21, 2008 5:57 am Reply with quote

Hi.

Both my RavenNuke sites are new and clean installations (each on different server - none of them running on a windows platform).

I have this issue 1 time out of 15-25 times...
 
montego







PostPosted: Mon Jan 21, 2008 6:09 am Reply with quote

Ok. Good to know. Are these very active servers by chance?
 
catweazle







PostPosted: Mon Jan 21, 2008 6:26 am Reply with quote

I have never had any problems related to speed on these servers (both sites are generated in 0,17 - 0,21 seconds), so I find it hard to believe that this is caused on the server side...
 
Raven







PostPosted: Mon Jan 21, 2008 10:49 am Reply with quote

When I say a width problem it's not (unfortunately) a simple block width. It's part of the internal algorithm for creating the captcha and calculating the width needed as compared to the width of the pieces. In other words it's a problem with the captcha creation itself.
 
catweazle







PostPosted: Mon Jan 21, 2008 11:58 am Reply with quote

Raven wrote:
In other words it's a problem with the captcha creation itself.

Believe it or not; I did in fact understand that much... Wink

I just made 35 reloads on one of my pages, and got two faulty captcha images:

This image shows what usually happens:
Image

This one is in fact a first-timer:
Image

Looks like there should be plenty of room for the missing characters.
Could it be that the captcha rutine don't calculate the right amount of characters at all times?
 
Raven







PostPosted: Mon Jan 21, 2008 12:13 pm Reply with quote

Quote:
Could it be that the captcha rutine don't calculate the right amount of characters at all times?


I think what you will find is that the missing characters are there but they are out of sight to the right of the border. That is the problem. As to why, I don't yet know. Otherwise you could match on just the visible characters.
 
catweazle







PostPosted: Mon Jan 21, 2008 4:34 pm Reply with quote

It might be I have very bad eyes (or a great imagination) but still...

I have compared lots of good captcha images with faulty ones, and to me it looks like the characters in fact are in place... but they are white (they have the background color)... In all the faulty images the colored lines are broken where the character(s) are supposed to be. You won't find broken colored lines in a good captcha image...

Take a look at the two images I posted earlier (above) and you'll see what I mean...
 
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Mon Jan 21, 2008 5:04 pm Reply with quote

I had a problem sort of like this once. It turns out that several of my font files had been uploaded with 0 file size. Check your includes/fonts directory for 12 font files and make sure they have non-zero length.

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Tue Jan 22, 2008 2:56 am Reply with quote

Open includes/class.php-captcha
find at around line 53;
Code:


define('CAPTCHA_WIDTH', 250);

You might want to make that a little smaller depending on your theme, maybe something like;
Code:
define('CAPTCHA_WIDTH', 175);

See how you go with that.
 
View user's profile Send private message Send e-mail
catweazle







PostPosted: Tue Jan 22, 2008 4:05 am Reply with quote

Thanks alot for your ideas and suggestions.

I checked the included fonts and they are all uploaded ok.

I decreased the "captcha_width" to
Code:
define('CAPTCHA_WIDTH', 175);

as suggested but it didn't help.
Then I decreased the "captcha_max_font_size" (I set it equal to the "captcha_min_font_size")
Code:
   define('CAPTCHA_MAX_FONT_SIZE', 16);

and that really seem to fix it.

I have made an umpteen number of reloads on the site... and no more faulty captcha images so far... Smile

Thanks alot for your time and effort guys!
Very much appreciated!!
--

Regards,
Catweazle.
 
Raven







PostPosted: Tue Jan 22, 2008 9:01 am Reply with quote

Looks like a future Team member in the making Wink

Thanks Catweazle. I know I had monkeyed around with this awhile back and I never quite resolved it. I remember adjusting the font widths and that seemed to work for a while but didn't fix it permanently. Hopefully you found the magic width setting!

Guardian, should we adjust the default setting in the distro?
 
catweazle







PostPosted: Tue Jan 22, 2008 9:44 am Reply with quote

It sure works great on both my sites, and I'll be happy if this will be helpfull to others as well.

My current settings:
Code:
define('CAPTCHA_WIDTH', 150);

define('CAPTCHA_MAX_FONT_SIZE', 16);


Some times the last character is slightly off to the right, but that's no big deal really... Smile
 
technocrat
Life Cycles Becoming CPU Cycles



Joined: Jul 07, 2005
Posts: 511

PostPosted: Tue Jan 22, 2008 10:33 am Reply with quote

That's one of the problems is the character spacing will cause the text to go too long. It creates problems from time to time.

How ever in the second image you posted it appears there is an X in white. Perhaps we need to find and adjust the color coding for the text to not use white or which ever color is set for the background.

_________________
Nuke-Evolution
phpBB-Evolution / phpBB-Evolution Blog 
View user's profile Send private message
Guardian2003







PostPosted: Tue Jan 22, 2008 11:05 am Reply with quote

technocrat - thanks for the input!
catweazle - thanks for trying that and your feedback is appreciated, glad that you're sorted now Smile
Raven - I think we should yes, I'm going to tinker with this a bit on my production site using all the default themes to see if I can determine some optimal settings and I'll then commit them to SVN

I had noticed the odd time I have had a failed log-in as an admin on my site but failed to notice the cause was an invisible digit in the CAPTCHA
 
montego







PostPosted: Thu Jan 24, 2008 10:31 am Reply with quote

I'll have to look more closely next time as well because I have had instances where letters were missing in-between others. Now I am wondering if they were there, but cleverly "hidden" due to its coloring.

Technocrat, is it even feasible the way the code works with the graphics library that a letter truly be missing? Might be worth double-checking.
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN v2.10.01 - All Issues

View next topic
View previous topic
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 vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©