Jump to content


Photo

Different Server -Different Mathematical Result


  • Please log in to reply
1 reply to this topic

#1 dpooper

dpooper
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 29 April 2006 - 04:37 PM

I have developed some scripts to do some time calculations and then convert the answer into years, days etc. I am using the floor() and % operators. I get totally expect results when I run the scripts on my local apache server at home, but when I send it to my live server (hosted by powweb.com) I get completely different results for the exact same script. I have spoken to POWWEB they said there was no difference in the way the maths functions in any release of PHP.

Why am I getting totally different results? Does anyone have any ideas because I don't see the point of having a development server if when I send it live I get totally different results.

I have also had this fault with other PHP scripts in the past. I just don't understand it.

Please help . . . .

Regards.

d Party Pooper

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 29 April 2006 - 05:51 PM

What version of php is on your dev server and what version is on the production server? Could be that the differences in local time zone and server time zone affect your calculations? Could be that variables are not passed properly to the calculations. Could be ... who knows. Without seeing any code it's hard to say what the problem might be. Post a complete simple example and state the 'local/expected' result and the production server result.
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users