Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.12

Bug #4477 fatal error when key of array is longer than 114 chars
Submitted: 2005-05-30 12:58 UTC
From: bottels at gmx dot net Assigned: aashley
Status: Closed Package: Config
PHP Version: 4.3.10 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2005-05-30 12:58 UTC] bottels at gmx dot net
Description: ------------ hi, in actual seagull cvs version i got this error while updating translations: Fatal error: uniqid(): The prefix to uniqid should not be more than 114 characters. in /srv/www/seagull/seagull/lib/pear/Config/Container.php on line 92 so i replaced line 92 with: $this->_id = uniqid(substr($name.$type,0,113), true); now it seems to work fine. Expected result: ---------------- we use the config package for storing arrays like word['english original text'] = 'my translation...'; so the key of the array can be very long. sometimes this makes probs, so i just chopped the value that is given to uniqid(). Actual result: -------------- fatal error (see above)

Comments

 [2005-05-31 18:44 UTC] ryansking at mac dot com
According to the docs, This was fixed after 4.3.1. Are you sure you're using 4.3.10? If so, this is a php bug.
 [2005-06-04 05:24 UTC] bottels at gmx dot net
sure. i asked phpinfo() before submitting this bug.
 [2005-12-24 02:32 UTC] aashley at php dot net
Try a newer version of PHP. I have tested this and been unable to replicate this problem with 4.3.11, 4.3.12, 5.0.5 and 5.1.0.
 [2006-02-13 11:32 UTC] peter at smartbusiness dot nu
The bug seems to still be in PHP 4.4.1 though. uniqid() breaks when passed a prefix of more than 114 chars.
 [2006-02-14 00:02 UTC] aashley at php dot net
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.