Jump to content


This topic is now archived and is closed to further replies.


Different Server -Different Mathematical Result

Recommended Posts

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 . . . .


d Party Pooper

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.