Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Thu Mar 28, 2024 6:22 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Fri May 29, 2009 8:30 am 
Offline
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group