It is possible to be less than 32  digits - but the chances are very small.


>  Hi Muthu,
>
> great, so we are sure it'll be always a 32 digit number even on 64 bit
> machines
>
> gj.
>
> On 2010-09-19 11:54.PD, Ap.Muthu wrote:
>> Hi GJ,
>>
>> File: installer/versions.php :
>> Line 10: $rmax=getrandmax();
>> Gives $rand a random number between 0 and 2147483647 on 32 bit installs -
>> that is 10 digits max.
>> Lines 32 to 34 place a computed default value using:
>> ( rand(1,$rmax) . rand(1,$rmax) ) * rand(1,$rmax)
>>
>> At a maximum, a 10 digit number cocatenated with another 10 digit number 
>> and
>> then the resulting max 19 digit number (since the max number begins with 
>> 2)
>> is multiplied with another max of 10 digit number resulting in a 27-29 
>> digit
>> number and hence the Scientific notation to fit within the 30 chars of 
>> the
>> input field as the PHP variable is defaulting to a 4 byte precision 
>> integer.
>>
>> Replacing the last expression with:
>>      substr((rand(1,$rmax).rand(1,$rmax).rand(1,$rmax).rand(1,$rmax)), 0, 
>> 32)
>> will ensure a high probability of getting a 32 digit number without
>> "Scientific Truncation".
>>
>> This has been committed in SVN 6761.
>>
>> Regards,
>> Ap.Muthu
>>
>>> Hi GJ,
>>>
>>> Can the $key* variables be hexadecimal numbers?
>>>
>>> Regards,
>>> Ap.Muthu
>>>
>>>>   Hi Muthu,
>>>>
>>>> it should be 32 bits, but for php it depends heavily on the platform,
>>>> you should chekc *PHP_INT_SIZE* for that.
>>>>
>>>> can you please contact robert to set up the demo ?
>>>> he is currently maintaining the care2x.org server
>>>>
>>>> gj.



------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Care2002-developers mailing list
Care2002-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/care2002-developers

Reply via email to