Visitor generator error


#1

I’ve downloaded Piwik from svn and I’m trying it on local server. When I try to generate fake visits I get:

Warning: mt_rand(): max(3) is smaller than min(5) in /var/www/html/piwik/trunk/plugins/VisitorGenerator/Generator.php on line 494

Backtrace -->
#0 Piwik_ErrorHandler(2, mt_rand(): max(3) is smaller than min(5), /var/www/html/piwik/trunk/plugins/VisitorGenerator/Generator.php, 494, Array ([maxLength] => 3,[minLength] => 5,[type] => alnum))#1 mt_rand(5, 3) called at [/var/www/html/piwik/trunk/plugins/VisitorGenerator/Generator.php:494]#2 Piwik_VisitorGenerator_Generator->getRandomString(3, 5, alnum) called at [/var/www/html/piwik/trunk/plugins/VisitorGenerator/Generator.php:474]#3 Piwik_VisitorGenerator_Generator->getRandomUrlFromHost(http://localhost) called at [/var/www/html/piwik/trunk/plugins/VisitorGenerator/Generator.php:412]#4 Piwik_VisitorGenerator_Generator->generateActionVisit() called at [/var/www/html/piwik/trunk/plugins/VisitorGenerator/Generator.php:352]#5 Piwik_VisitorGenerator_Generator->generate(89, 10) called at [/var/www/html/piwik/trunk/plugins/VisitorGenerator/Controller.php:104]#6 Piwik_VisitorGenerator_Controller->generate()#7 call_user_func_array(Array ([0] => Piwik_VisitorGenerator_Controller Object ([] => VisitorGenerator,[] => 2011-01-22,[] => Piwik_Date Object ([] => 1295728449,[] => UTC),[] => 1,[] => Piwik_Site Object ([] => 1)),[1] => generate), Array ()) called at [/var/www/html/piwik/trunk/core/FrontController.php:125]#8 Piwik_FrontController->dispatch() called at [/var/www/html/piwik/trunk/index.php:60]

However visits are generated (I can see them in log).


#2

Another problem I found in the svn version is that in user management tab I cannot see any user, even the administrator account… it says “There are currently 0 registered users.” but I can login in piwik regularly.


(vipsoft) #3

The mt_rand() issue is fixed in trunk; thanks.