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 Fri Mar 29, 2024 2:45 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
PostPosted: Fri Jul 15, 2011 10:46 pm 
Offline
Newbie

Joined: Sat May 14, 2011 12:00 am
Posts: 13
Hi everyone,
trying to do some scheduling but had this error.
I have included the lines where the error originates with the hope that someone will give me a solution or a tip on how to avoid.

Notice: Undefined index: 0 in C:\xampp\htdocs\openaudit\audit_schedule.php on line 24

[code] $daily_frq = (!is_null($cfg[$id])) ? $cfg[$id]['daily_frequency'] : 1;[/code]

Notice: Undefined index: 0 in C:\xampp\htdocs\openaudit\audit_schedule.php on line 52

[code] <?php Get_Audit_Configs($cfg[$id]['config_id']); ?>[/code]

Notice: Undefined index: 0 in C:\xampp\htdocs\openaudit\audit_schedule.php on line 74

[code] <input type="checkbox" onclick="toggleLogging(this)" size="20" id="check_log_disable" name="check_log_disable" <?php if ( $cfg[$id]['log_disabled'] ) { echo "CHECKED"; } ?>/>[/code]

Notice: Undefined index: 0 in C:\xampp\htdocs\openaudit\audit_schedule.php on line 77

[code]<input type="checkbox" onclick="toggleEmail(this)" size="20" id="check_email_log" name="check_email_log" <?php if ( $cfg[$id]['email_log'] ) { echo "CHECKED"; } ?>/>[/code]


Infact I just noticed I have lots of "Undefined index:0" errors. How can work on this?


Top
 Profile  
Reply with quote  
PostPosted: Sat Jul 16, 2011 3:01 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
I don't use the web scheduling as the code came after I started using OpenAudit. I've also found it to be a bit touchy and likely to explode at any moment; As you've discovered.

Having said that I don't think the undefined index is your problem. The web scheduling portion of OpenAudit doesn't handle [url=http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html]MySQL strict mode[/url].

Edit audit_sched_add_ajax.php and change the following around line 150:
[code]
$db = GetOpenAuditDbConnection();
mysql_query($sql,$db) or die("Could not add/update schedule: " . mysql_error() . "<br>$sql");[/code]

To this:
[code]
$db = GetOpenAuditDbConnection();
$result = mysql_query("SET @@session.sql_mode=''",$db);
mysql_query($sql,$db) or die("Could not add/update schedule: " . mysql_error() . "<br>$sql");[/code]

See what that does.


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.  [ 2 posts ] 

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:  
Powered by phpBB® Forum Software © phpBB Group