Open-AudIT

What's on your network?
It is currently Sat Jan 20, 2018 5:17 pm

All times are UTC + 10 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Beta 4 Bugs
PostPosted: Tue Oct 25, 2011 6:21 am 
Offline
Newbie

Joined: Thu Sep 22, 2011 5:20 am
Posts: 7
I have an issue with an audit that ran on one of my company's Windows laptops. At submit time, the audit submits, but a PHP Error occurs. The audit is still processed, inserted into the DB, and shows on the PHP front-end details for that system.

The error is as follows.....

Update

A PHP Error was encountered

Severity: Notice

Message: Undefined property: System::$m_oa_group

Filename: controllers/system.php

Line Number: 159

Fatal error: Call to a member function update_system_groups() on a non-object in E:\xampplite\OAv2\code_igniter\system\application\controllers\system.php on line 159

Any ideas?


Top
 Profile  
Reply with quote  
 Post subject: Re: Beta 4 Bugs
PostPosted: Wed Oct 26, 2011 7:05 pm 
Offline
Newbie

Joined: Fri Sep 30, 2011 10:24 pm
Posts: 7
@kumail
That's not an OpenAudit bug, but rather a server-side misconfiguration.
Actually, this is not a critical error, not even a warning error, but rather a "notice" (nothing you should pay much attention to). On production servers, PHP error messages should not be displayed/forwarded to the end users, and therefore errors should only be tracked via your webservers standard logging mechanisms (logfiles). To achieve this on PHP applications, one has to edit the webserver's php.ini file and modify the error_reporting directive.

In your case, you could just disable notices and let only the more important errors display by modifying the error_reporting directive your php.ini (in my linux system the file's path is /etc/php.ini, on windows the file is somewhere in the xampp folder, e.g. c:\xampp\php\php.ini) as shown bellow:
Code:
error_reporting = E_ALL & ~E_NOTICE

This will still show all errors and turn off notices.

_________________
Server Info:
OS : CentOS Linux release 6.0 (Final)
Auditing: 700 machines
LDAP: Active Directory


Top
 Profile  
Reply with quote  
 Post subject: Re: Beta 4 Bugs
PostPosted: Thu Oct 27, 2011 3:47 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1226
I don't think this is an error that should be papered over.

Looking at the code it looks like line 159 in application\controllers\system.php tries to call update_system_groups on m_oa_group before the m_oa_group model is loaded in line 166.

So maybe from this:
Code:
      // update any tags for new printers
      $this->m_sys_man_audits->update_audit($details, 'network printers');
      $network_printers = $this->m_printer->get_new_network_printer($details);
      if (count($network_printers) > 0) {
         foreach ($network_printers as $printer) {
            $this->m_oa_group->update_system_groups($printer);
         }
      }
   
   
      // Finally, update any tags for this system
      $this->m_sys_man_audits->update_audit($details, 'system groups');
      $this->load->model("m_oa_group");


to this:

Code:
      // update any tags for new printers
      $this->load->model("m_oa_group");
      $this->m_sys_man_audits->update_audit($details, 'network printers');
      $network_printers = $this->m_printer->get_new_network_printer($details);
      if (count($network_printers) > 0) {
         foreach ($network_printers as $printer) {
            $this->m_oa_group->update_system_groups($printer);
         }
      }
   
   
      // Finally, update any tags for this system
      $this->m_sys_man_audits->update_audit($details, 'system groups');


Or I could be totally wrong and that is how Mark intended it.


Top
 Profile  
Reply with quote  
 Post subject: Re: Beta 4 Bugs
PostPosted: Thu Oct 27, 2011 8:28 am 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1933
Location: Brisbane, Australia
Looks like a bug.
I've fixed it locally...

_________________
Support and Development hours available from Opmantek.
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 4 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