Open-AudIT
https://www.open-audit.org/phpBB3/

Device not showing (SOLVED)
https://www.open-audit.org/phpBB3/viewtopic.php?f=20&t=5836
Page 1 of 1

Author:  aylnews [ Thu Feb 02, 2012 9:43 pm ]
Post subject:  Device not showing (SOLVED)

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=1] File comment: attachment 1
attachment1.png
attachment1.png [ 35.15 KiB | Viewed 9280 times ]


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

[attachment=0] File comment: attachment 2
attachment2.png
attachment2.png [ 11.45 KiB | Viewed 9280 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

Author:  aylnews [ Thu Feb 02, 2012 9:54 pm ]
Post subject:  Re: Device not showing

Forgot to mention I am trying to run it on Centos 6.

Author:  jpa [ Fri Feb 03, 2012 2:10 am ]
Post subject:  Re: Device not showing

First thing I'd do is review the php error logs for anything indicative of the problem.

Author:  aylnews [ Fri Feb 03, 2012 2:21 am ]
Post subject:  Re: Device not showing

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.

Author:  jpa [ Fri Feb 03, 2012 3:28 am ]
Post subject:  Re: Device not showing

What about the Apache logs?

Author:  aylnews [ Fri Feb 03, 2012 4:22 am ]
Post subject:  Re: Device not showing

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.

Author:  jpa [ Fri Feb 03, 2012 5:34 am ]
Post subject:  Re: Device not showing

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.

Author:  Mark [ Fri Feb 03, 2012 1:07 pm ]
Post subject:  Re: Device not showing

[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).

Author:  aylnews [ Fri Feb 03, 2012 8:48 pm ]
Post subject:  Re: Device not showing

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 . "'>" . [color=#FF0000] $report->report_name[/color] . "</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=1] attachment 3.png
attachment 3.png [ 18.42 KiB | Viewed 9256 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=0] attachment 4.png
attachment 4.png [ 4.27 KiB | Viewed 9256 times ]

Author:  aylnews [ Sat Feb 04, 2012 12:52 am ]
Post subject:  Re: Device not showing (SOLVED)

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.

Page 1 of 1 All times are UTC + 10 hours
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/