2007-02-27, 11:00 AM
Not sure why you use function rand() in few places:
init.php
functions.php
captcha.php
From PHP manual:
In file init.php:
FIND:
In file functions.php:
FIND:
In captcha.php - many lines.
MyBB: 1.2.3
init.php
functions.php
captcha.php
From PHP manual:
Quote:Many random number generators of older libcs have dubious or unknown characteristics and are slow. By default, PHP uses the libc random number generator with the rand() function. The mt_rand() function is a drop-in replacement for this. It uses a random number generator with known characteristics using the ยป Mersenne Twister, which will produce random numbers four times faster than what the average libc rand() provides.
In file init.php:
FIND:
// Generate a random number for performing random actions.
$rand = rand(0, 10);
REPLACE WITH:// Generate a random number for performing random actions.
$rand = mt_rand(0, 10);
In file functions.php:
FIND:
$ch = rand(0, count($set)-1);
REPLACE WITH:$ch = mt_rand(0, count($set)-1);
In captcha.php - many lines.
MyBB: 1.2.3