|
Newbie |
Joined: Thu Oct 06, 2005 7:29 am Posts: 2 Location: Madison, WI USA
|
I recently downloaded the 20090317 version and noticed the audit times never changed on subsequent audits of the same PC. No errors. I then set online="ie" and ie_visible="y" to see what was going on and saw this message:
Cannot insert old data when newer data already exists in the database, sorry!
In Admin_pc_add_2.php I saw what generated this error:
[code] if ($software_timestamp >= $timestamp and $timestamp != "") { die("Cannot insert old data when newer data already exists in the database, sorry!"); } [/code]
The timestamp is a numeric string like 2090528123456 which will need to be converted to an integer but when it's more then 2^^31 (on a 32 bit platform) results are unpredictable. After changing the if to use strcmp it works as advertised:
[code] if (strcmp($software_timestamp,$timestamp) >= 0 and $timestamp != "") { die("Cannot insert old data when newer data already exists in the database, sorry!"); } [/code]
This was with PHP 5.2
I see this problem is also in older versions too.
|
|