You may have to seed the pseudo-random number generators first with:
srand()
and
mt_srand()
Just a note from the php manual:
Note: As of PHP 4.2.0, there is no need to seed the random number generator with srand() or mt_srand() as this is now done automatically.