Cita:
Iniciado por portalmana
P.D.: Después dime como al final lo pudiste solucionar, uno nunca sabe cuando va a caer en estos problemas...
Saludos
Usamos esta funcion para forzar u obligar a enteros signed de 32bits, asi no importa la estructura del procesador ni alguna variable, de esta forma la funcion daba los resultados iguales en ambos servidores:
Código PHP:
Ver originalfunction ticket($pin){
function thirtyTwoBitIntval($value)
{
if ($value < -2147483648)
{
return -(-($value) & 0xffffffff);
}
elseif ($value > 2147483647)
{
return ($value & 0xffffffff);
}
return $value;
}
$istore2 = 0;
$istore3 = 1313;
for ($w = 0; $w < count($pin); $w++){ $istore5 = ord($pin[$w]); $istore2 = thirtyTwoBitIntval(thirtyTwoBitIntval($istore2) * $istore3);
$istore21= thirtyTwoBitIntval(((($istore5 *$istore5) *$istore5) * 667)*$w);
$istore2 = thirtyTwoBitIntval(thirtyTwoBitIntval($istore2) + thirtyTwoBitIntval($istore21));
}
$istore2 = thirtyTwoBitIntval((thirtyTwoBitIntval($istore2) & 2147483647) % 65536);
for ($istore5 = 4; $istore5 >= 0; $istore5-- ){
$astore4[$istore5] = ((int)$istore2 % 10) + 48;
$istore2 = (int)$istore2 / 10;
}
$key=0;
for ($i=1; $i<count($astore4); $i++){ }
return $ticket;
}
Agradezco muchisimo tu ayuda, aqui te dejo el codigo por si llegas a pasar algun dia por ese problema.