Open-AudIT

What's on your network?
It is currently Fri Jan 19, 2018 3:58 pm

All times are UTC + 10 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Thu Feb 02, 2012 9:43 pm 
Offline
Newbie

Joined: Wed Jun 15, 2011 1:12 am
Posts: 30
I have been successfully running OAv2 for months now under my Windows PC and am loving it. I wanted to move it to Linux but am having some problems.

I have migrated the database from my windows install and installed the php files and OA application changing the setting where necessary. I can run an audit successfully from windows and send the results to the new database and am seeing the front page update OK.

However, I am not getting anything when I click on any group item. I know the database is OK as I can migrate it back to my Windows install and it works perfectly.

I did have some problems initially trying to load site as I did not have the php-mbstring module installed.

I have now got this installed and can see the front screen with all my device groups listed(see attachment 1)

Attachment:
File comment: attachment 1
attachment1.png
attachment1.png [ 35.15 KiB | Viewed 2039 times ]


but as you can see from attachment 2 when I click on one of the groups I only get the header.

Attachment:
File comment: attachment 2
attachment2.png
attachment2.png [ 11.45 KiB | Viewed 2039 times ]


I am figuring maybe I am missing another php module or a php config setting somewhere.

Any hints or tips would be greatly appreciated


Last edited by aylnews on Sat Feb 04, 2012 1:25 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Device not showing
PostPosted: Thu Feb 02, 2012 9:54 pm 
Offline
Newbie

Joined: Wed Jun 15, 2011 1:12 am
Posts: 30
Forgot to mention I am trying to run it on Centos 6.


Top
 Profile  
Reply with quote  
 Post subject: Re: Device not showing
PostPosted: Fri Feb 03, 2012 2:10 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1225
First thing I'd do is review the php error logs for anything indicative of the problem.


Top
 Profile  
Reply with quote  
 Post subject: Re: Device not showing
PostPosted: Fri Feb 03, 2012 2:21 am 
Offline
Newbie

Joined: Wed Jun 15, 2011 1:12 am
Posts: 30
Thank you jpa, however, that is already already switched on and not reporting anything to the file or the screen.

There were errors being reported which is how I found that the multibyte module was not installed, I installed the php-mbstring.i386 module. Now I can login and get the main page but nothing further is being reported to the php_error.log when I click any of the listed devices.


Top
 Profile  
Reply with quote  
 Post subject: Re: Device not showing
PostPosted: Fri Feb 03, 2012 3:28 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1225
What about the Apache logs?


Top
 Profile  
Reply with quote  
 Post subject: Re: Device not showing
PostPosted: Fri Feb 03, 2012 4:22 am 
Offline
Newbie

Joined: Wed Jun 15, 2011 1:12 am
Posts: 30
Nothing in there either unfortunately. I have noticed however, that it doesn't finishing building the menus, when I click on the "REPORTS" menu item i don't get anything back if that helps narrow it down at all.


Top
 Profile  
Reply with quote  
 Post subject: Re: Device not showing
PostPosted: Fri Feb 03, 2012 5:34 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1225
Since you've at least got the REPORTS menu header showing view the HTML source for the partially completed page and search for "REPORTS" in the text and see how much it got completed after that. Maybe post that here.


Top
 Profile  
Reply with quote  
 Post subject: Re: Device not showing
PostPosted: Fri Feb 03, 2012 1:07 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1933
Location: Brisbane, Australia
Quote:
Since you've at least got the REPORTS menu header showing view the HTML source for the partially completed page and search for "REPORTS" in the text and see how much it got completed after that.
Yup, what JPA said.

You can also try installing FireBug and FirePHP in Firefox, then enabling firephp in code_igniter\system\application\config\fireignition.php (just set the variable to TRUE).
Once you do that, you should be able to open the FireBug console and see each SQL query run through (and some other stuff). This should point to where it's stopping.

You may need to use an old version of Firefox is these extensions aren't available. I sometimes use Portable Firefox 3.6 for this reason (not for normal browsing). I'm not sure if there are equivalent extensions for Chrome.

Also note that leaving debug on is not recommended as it WILL slow down execution (think processing systems, running reports, et al).

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


Top
 Profile  
Reply with quote  
 Post subject: Re: Device not showing
PostPosted: Fri Feb 03, 2012 8:48 pm 
Offline
Newbie

Joined: Wed Jun 15, 2011 1:12 am
Posts: 30
I have tracked down in the code what is causing the problem, however, obviously this is not an error in the code but an error with my linux/PHP install which is the underlying cause.

This is a section from the html source of the broken one, note the error on the last line about Language-Learning mode:-

<div id="wrapper">
<div id="topsection" style="margin: 0 auto; padding: 10px 0;">
<div id="header" style='height: 70px; margin-left: auto; margin-right: auto; padding: 0px 0px 0px 0px; text-align: left;'>
<div style="width:260px; float: left; text-align: left;">
<img src='http://openaudit.aylnews.com/theme-tango/tango-images/logo.png' alt='logo' style='border-width:0px;' />
</div>
<div style="width:100px; float: right; text-align: center;">
<br /><a href="http://openaudit.aylnews.com/index.php/main/edit_user">Administrator<br /></a>
<a href="http://openaudit.aylnews.com/index.php/login/logout"><img id="logout_button" src="http://openaudit.aylnews.com/theme-tango/tango-images/28_button_logout.png" onmouseover="this.src='http://openaudit.aylnews.com/theme-tango/tango-images/28_button_logout_over.png'" onmouseout="this.src='http://openaudit.aylnews.com/theme-tango/tango-images/28_button_logout.png'" alt="" style='border-width:0px;' /></a>
</div>
</div>
<div id="menu" style="float: left; width: 100%; ">
<ul id="nav">
<li><a href='http://openaudit.aylnews.com/index.php/main'>HOME</a></li>
<li><a href='#'>REPORTS</a>
<ul>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/1/1'>Acrobat</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/2/1'>Alerts</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/3/1'>Alerts - New Systems</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/4/1'>Alerts - Software</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/5/1'>Alerts - Software Updates</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/6/1'>Alerts - USB Disks</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/7/1'>AntiVirus</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/8/1'>Audit Dates</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/9/1'>Changes</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/24/1'>Databases</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/26/1'>Dell Systems</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/28/1'>Installed Services</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/30/1'>Installed Software</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/31/1'>Local Administrators</a></li>
<li style="width:200px;"><a href='http://openaudit.aylnews.com/index.php/report/show_report/33/1'>Log Files</a></li>
Language-Learning-Mode, but /usr/OAv2/code_igniter/system/application/views/lang/en.inc not writeable



This is a section from my Windows installation which is working:-

<div id="wrapper">
<div id="topsection" style="margin: 0 auto; padding: 10px 0;">
<div id="header" style='height: 70px; margin-left: auto; margin-right: auto; padding: 0px 0px 0px 0px; text-align: left;'>
<div style="width:260px; float: left; text-align: left;">
<img src='http://localhost/oav2/theme-tango/tango-images/logo.png' alt='logo' style='border-width:0px;' />
</div>
<div style="width:100px; float: right; text-align: center;">
<br /><a href="http://localhost/oav2/index.php/main/edit_user">Administrator<br /></a>
<a href="http://localhost/oav2/index.php/login/logout"><img id="logout_button" src="http://localhost/oav2/theme-tango/tango-images/28_button_logout.png" onmouseover="this.src='http://localhost/oav2/theme-tango/tango-images/28_button_logout_over.png'" onmouseout="this.src='http://localhost/oav2/theme-tango/tango-images/28_button_logout.png'" alt="" style='border-width:0px;' /></a>
</div>
</div>
<div id="menu" style="float: left; width: 100%; ">
<ul id="nav">
<li><a href='http://localhost/oav2/index.php/main'>HOME</a></li>
<li><a href='#'>REPORTS</a>
<ul>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/1/1'>Acrobat</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/2/1'>Alerts</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/3/1'>Alerts - New Systems</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/4/1'>Alerts - Software</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/5/1'>Alerts - Software Updates</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/6/1'>Alerts - USB Disks</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/7/1'>AntiVirus</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/8/1'>Audit Dates</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/9/1'>Changes</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/24/1'>Databases</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/26/1'>Dell Systems</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/28/1'>Installed Services</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/30/1'>Installed Software</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/31/1'>Local Administrators</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/33/1'>Log Files</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/34/1'>MS Frontpage</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/35/1'>MS Office</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/32/1'>MS Office Versions</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/29/1'>MS Project</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/27/1'>MS Suite</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/25/1'>MS Visio</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/23/1'>Orphaned Users</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/22/1'>Partitions</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/21/1'>Reconciliation</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/20/1'>Shares</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/19/1'>Software Keys</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/17/1'>System Details</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/16/1'>System Hardware</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/15/1'>System Locations</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/14/1'>System Manual Export</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/13/1'>System Replacement</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/12/1'>User PC Report</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/11/1'>Web Sites</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/show_report/10/1'>Workstation Details</a></li>
<li style="width:200px;"><a href='http://localhost/oav2/index.php/report/partition_alert/1'>Partition Alerts</a></li>
</ul>
</li>


If I modify the code_igniter\system\application\views\theme-tango\inlude_menu.php file and take out the __() from the report section of the foreach statement. i.e. do :-

<div id="menu" style="float: left; width: 100%; ">
<ul id="nav">
<li><a href='<?php echo base_url()?>index.php/main'><?php echo mb_strtoupper(__('Home'))?></a></li>
<?php if (isset($group_id)){
echo "<li><a href='#'>" . mb_strtoupper(__('Reports')) . "</a>\n";
echo "<ul>\n";
foreach ($menu as $report):
echo "<li style=\"width:200px;\"><a href='" . base_url() . "index.php/report/show_report/" . $report->report_id . "/" . $group_id . "'>" . $report->report_name . "</a></li>\n";
endforeach;
echo "<li style=\"width:200px;\"><a href='" . base_url() . "index.php/report/partition_alert/" . $group_id . "'>" . __('Partition Alerts') . "</a></li>\n";
echo "</ul>\n";
echo "</li>\n";
} ?>


instead of this:-

<div id="menu" style="float: left; width: 100%; ">
<ul id="nav">
<li><a href='<?php echo base_url()?>index.php/main'><?php echo mb_strtoupper(__('Home'))?></a></li>
<?php if (isset($group_id)){
echo "<li><a href='#'>" . mb_strtoupper(__('Reports')) . "</a>\n";
echo "<ul>\n";
foreach ($menu as $report):
echo "<li style=\"width:200px;\"><a href='" . base_url() . "index.php/report/show_report/" . $report->report_id . "/" . $group_id . "'>" . __($report->report_name) . "</a></li>\n";
endforeach;
echo "<li style=\"width:200px;\"><a href='" . base_url() . "index.php/report/partition_alert/" . $group_id . "'>" . __('Partition Alerts') . "</a></li>\n";
echo "</ul>\n";
echo "</li>\n";
} ?>


Then the page displays correctly.

From my very limited understanding and the assistance of a colleague the __() is used for localisation as the the "Language-Learning-Mode, but /usr/OAv2/code_igniter/system/application/views/lang/en.inc not writeable" error may suggest.

Funnily enough when I got that page to work I clicked on an item in the list and that error then showed up on the next page:-

Attachment:
attachment 3.png
attachment 3.png [ 18.42 KiB | Viewed 2015 times ]


Clearly I do not want to keep my temporary hack in place as this not the answer and also I will have to change code elsewhere plus it will be overwritten by the next update.

I have yet to find the underlying cause. I am guessing somewhere the system does not know that I am English??

BTW I did actually check the file was writeable:-

Attachment:
attachment 4.png
attachment 4.png [ 4.27 KiB | Viewed 2015 times ]


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 04, 2012 12:52 am 
Offline
Newbie

Joined: Wed Jun 15, 2011 1:12 am
Posts: 30
I have solved this now. SELinux was enabled. After disabling SELinux and rebooting everything just worked. I am sure if I spent time configuring SELinux I could probably get it working but I don't really need the hassle and the security is not that important.

Thanks for you help.


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

All times are UTC + 10 hours


Who is online

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