3D Wave Captcha and PHP 5.3.4+ problem

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
Yarr Me
Registered User
Posts: 2
Joined: Sat Jan 08, 2011 6:10 pm
Location: Russia, Moscow

3D Wave Captcha and PHP 5.3.4+ problem

Post by Yarr Me » Sat Jan 08, 2011 6:24 pm

Hello.
I am using default board on my own vps server where I recently updated PHP to the latest 5.3.5 version (previously there was 5.3.3) and got some problem with 3D wave captcha. Generally its failing because of the patch to the mt_rand() function in 5.3.4 version of PHP: "Fixed bug #46587 (mt_rand() does not check that max is greater than min). (Ilia)". Every time when board tries to generate captcha it fails to do so with error:

Code: Select all

Error while creating image
» Error in /includes/captcha/captcha_gd_wave.php on line 65: mt_rand(): max(315) is smaller than min(355)
Error while creating image
» Error in /includes/captcha/captcha_gd_wave.php on line 66: mt_rand(): max(81) is smaller than min(96)
.. because it tries to get random number with bad parameters (min value is higher than max). And I think its not only my boards bug but general bug ant it should be fixed.
But anyways I want to ask: does anyone have the same error?
Last edited by Yarr Me on Sat Jan 08, 2011 7:43 pm, edited 1 time in total.
PS. I know my English is not good 8-)

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10341
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: 3D Wave Captcha and PHP 5.3.4+ problem

Post by Noxwizard » Sat Jan 08, 2011 7:26 pm

Since your account is new, it hasn't transitioned over to the tracker yet. I've made a ticket about it for you: http://tracker.phpbb.com/browse/PHPBB3-9985
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

User avatar
Yarr Me
Registered User
Posts: 2
Joined: Sat Jan 08, 2011 6:10 pm
Location: Russia, Moscow

Re: 3D Wave Captcha and PHP 5.3.4+ problem

Post by Yarr Me » Sat Jan 08, 2011 7:42 pm

Noxwizard wrote:Since your account is new, it hasn't transitioned over to the tracker yet. I've made a ticket about it for you: http://tracker.phpbb.com/browse/PHPBB3-9985
Thank you very much.
I tried to fix that bug by adjusting mt_rand parameters on 65 and 66 lines in captcha_gd_wave.php and it almost started working for now, but sometimes generates errors on other line with the same mt_rand problem so I decided to create post here to let you guys know about it too.
PS. I know my English is not good 8-)

_Maxxi_
Registered User
Posts: 31
Joined: Thu Jul 17, 2008 9:02 pm

Re: 3D Wave Captcha and PHP 5.3.4+ problem

Post by _Maxxi_ » Tue Feb 15, 2011 9:42 pm

The same is without wave gd captcha:

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 80: mt_rand() [function.mt-rand]: max(-7) is smaller than min(0)
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 80: mt_rand() [function.mt-rand]: max(-9) is smaller than min(0)
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 80: mt_rand() [function.mt-rand]: max(-11) is smaller than min(0)
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 80: mt_rand() [function.mt-rand]: max(-13) is smaller than min(0)
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 80: mt_rand() [function.mt-rand]: max(-18) is smaller than min(0)
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 80: mt_rand() [function.mt-rand]: max(-27) is smaller than min(0)
[phpBB Debug] PHP Notice: in file /includes/captcha/captcha_gd.php on line 80: mt_rand() [function.mt-rand]: max(-42) is smaller than min(0)

User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10341
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: 3D Wave Captcha and PHP 5.3.4+ problem

Post by Noxwizard » Tue Feb 15, 2011 10:01 pm

Yes, it has already been reported: http://tracker.phpbb.com/browse/PHPBB3-10042
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.

Locked

Return to “[3.0.x] Support Forum”