ID: 26381 User updated by: spam at vrana dot cz Reported By: spam at vrana dot cz -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: Windows XP -PHP Version: 4.3.3 +PHP Version: 4.3.5-dev New Comment:
Yes. The problem occurs also with CVS snapshot. Previous Comments: ------------------------------------------------------------------------ [2003-12-02 11:04:40] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-12-02 10:57:15] spam at vrana dot cz I can't believe myself, the problem is caused by something completely different. I discovered that the problem occurs only under this circumstances: 1. Lines in php.ini file ends by CRLF. 2. Windows Extensions part in php.ini is longer than 503 characters (including new-lines). I don't know what is it but it looks like buffer overflow or something like that. So the problem is probably in php-src/main/php_ini.c or somewhere near. ------------------------------------------------------------------------ [2003-12-02 10:22:37] nunoplopes at sapo dot pt This bug is solved! I have the latest windows snapshot on windows xp and cli returns a random value without the need to use srand. ------------------------------------------------------------------------ [2003-11-28 04:26:47] spam at vrana dot cz The behavior of rand() really changed in PHP 4.2.0, it is stated in Changelog. The documentation is correct. And there is coded this feature in source codes (php-src/ext/standard/rand.c, line 327 in current CVS). I don't know where the problem is, I don't understand PHP internals. I can only see that there is global variable rand_is_seeded set on line 58 and checked on line 326. Maybe the problem is that this variable wasn't initialized. I'm just guessing because as I wrote, I don't understand PHP internals. ------------------------------------------------------------------------ [2003-11-25 08:57:29] [EMAIL PROTECTED] Manual is wrong. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26381 -- Edit this bug report at http://bugs.php.net/?id=26381&edit=1