Page 1 of 1

nagios index.php , main.php wont work correct

Posted: Thu Oct 10, 2019 8:47 am
by rafaellouroreis
Hi guys,

i dont know whats going on, but when i try to open http://localhost/nagios/index.php or http://localhost/nagios/main.php , wont load correct, and i cant find why.

if i go direct to http://localhost/nagios/cgi-bin/status. ... e=overview it works like always....


some help, please :)

i instaled nagios core 4.4.5 today, but no changes.
nagios1.PNG
nagios2.PNG
nagios3.PNG

Re: nagios index.php , main.php wont work correct

Posted: Thu Oct 10, 2019 9:57 am
by scottwilkerson
Is php installed on the server and the module enabled?

Re: nagios index.php , main.php wont work correct

Posted: Fri Oct 11, 2019 2:01 am
by rafaellouroreis
Thanks a lot!! That was a big Help. Php wasnt active. I had to install, dont know why .. but its looking better.

Strange is that main.php still wont load correct in Chrome...... just show code ( BUT in FIREFOX WORKS FINE )!!! :

maybe because iframes ???


<?php
include_once(dirname(__FILE__).'/includes/utils.inc.php');

$this_version = '4.4.5';
$this_year = '2019';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
<title>Nagios Core</title>
<link rel="stylesheet" type="text/css" href="stylesheets/common.css?<?php echo $this_version; ?>" />
<link rel="stylesheet" type="text/css" href="stylesheets/nag_funcs.css?<?php echo $this_version; ?>" />
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="js/nag_funcs.js"></script>

<script type='text/javascript'>
var cookie;
<?php if ($cfg["enable_page_tour"]) { ?>
var vbox;
var vBoxId = "main";
var vboxText = "<a href=https://www.nagios.com/tours target=_blank> " +
"Click here to watch the entire Nagios Core 4 Tour!</a>";
<?php } ?>
$(document).ready(function() {
var user = "<?php echo htmlspecialchars($_SERVER['REMOTE_USER']); ?>";

<?php if ($cfg["enable_page_tour"]) { ?>
vBoxId += ";" + user;


etc
etc etc

Re: nagios index.php , main.php wont work correct

Posted: Fri Oct 11, 2019 6:15 am
by scottwilkerson
rafaellouroreis wrote:Strange is that main.php still wont load correct in Chrome...... just show code ( BUT in FIREFOX WORKS FINE )!!! :
My guess us you need to clear the cache in Chrome

Re: nagios index.php , main.php wont work correct

Posted: Fri Oct 11, 2019 7:07 am
by rafaellouroreis
Dammm.... i own you a coffee :)


Thanks

Re: nagios index.php , main.php wont work correct

Posted: Fri Oct 11, 2019 7:10 am
by scottwilkerson
rafaellouroreis wrote:Dammm.... i own you a coffee :)


Thanks
:lol:

Glad it's resolved.

Locking thread