View Single Post
  #1  
Old 06-23-2005, 10:00 AM
  jds580s's Avatar 
jds580s jds580s is offline
 

Advanced Member
  
Join Date: Oct 2004
Posts: 38
 

Default Smarty divides by 3 incorrectly on a new server

I am changing servers and on the new server smarty is dividing by 3 incorrectly. I know that sounds strange, but I set up a test page in the process of tracking down my the storefront displays incorrectly.

http://160.79.206.160/test.php
and here is the smarty math

you can see that floor(100/4) = 25
but floor(100/3) = 1077979818

http://160.79.206.160/test.tpl
Code:
{math equation="floor(x/y)" x=100 y=$columns assign="cell_width"} ======================= This is Smarty Results Cell Width = floor(x/y) x=100 y=columns columns: {$columns} Cell Width: {$cell_width} {math equation="floor(x/y)" x=100 y=3 assign="new_cell_width"} ======================= Same Smarty math, but with non variable inputs Cell Width = floor(x/y) x=100 y=3 columns: 3 Cell Width: {$new_cell_width} {math equation="floor(x/y)" x=100 y=4 assign="new_cell_width"} ======================= Same Smarty math, but with non variable inputs Cell Width = floor(x/y) x=100 y=4 columns: 4 Cell Width: {$new_cell_width}

has anyone else seen anything like this before? Any ideas on what I can do? Or am I just crazy, and is this the result it should be giving?

Thanks a bunch!

Justin
__________________
animator for hire
onthez.com
------------------------
x-cart v4.0.5 Linux
_________________
Reply With Quote