Connecting Tech Pros Worldwide Help | Site Map

Error in Hexadecimal Conversion

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 12:16 PM
Ron Reid
Guest
 
Posts: n/a
Default Error in Hexadecimal Conversion

Hello,

I use XTea for encrypting credit card data. My current live site is
running on FC1/PHP 4.3.8 and the script works great.

However, I'm setting up a new machine with FC3/PHP 4.3.10 and I've
encountered a problem with the exact same code (tarred up and moved
over). The install was very basic... standard web server options, used
YUM to upgrade PHP, et al.

It appears that the new box is not converting hex to integers
correctly. Example...

<? $delta = (integer) 0x9E3779B9;
echo $delta; ?>

Result from FC1 box: -1640531527
Result from another FC1 box: -1640531527 (identical)
Result from FC3 box: 2147483647

I tried upgraded to PHP 5.0.3, but get the same values.

I'm not even sure where to start looking... any ideas?

Ron


  #2  
Old July 17th, 2005, 12:16 PM
Alvaro G. Vicario
Guest
 
Posts: n/a
Default Re: Error in Hexadecimal Conversion

*** Ron Reid escribió/wrote (24 Mar 2005 07:52:26 -0800):[color=blue]
> <? $delta = (integer) 0x9E3779B9;
> echo $delta; ?>
>
> Result from FC1 box: -1640531527
> Result from another FC1 box: -1640531527 (identical)
> Result from FC3 box: 2147483647
>
> I tried upgraded to PHP 5.0.3, but get the same values.
>
> I'm not even sure where to start looking... any ideas?[/color]

It'd say it has to do with glibc libraries. They may be using different
sizes for integers :-?


--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ No envíes tu dudas a mi correo, publícalas en el grupo
-+ Do not send me your questions, post them to the group
--
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.