nagios index.php , main.php wont work correct

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
rafaellouroreis
Posts: 9
Joined: Wed Jun 12, 2019 1:28 am

nagios index.php , main.php wont work correct

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

Is php installed on the server and the module enabled?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
rafaellouroreis
Posts: 9
Joined: Wed Jun 12, 2019 1:28 am

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

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
rafaellouroreis
Posts: 9
Joined: Wed Jun 12, 2019 1:28 am

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

Post by rafaellouroreis »

Dammm.... i own you a coffee :)


Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post by scottwilkerson »

rafaellouroreis wrote:Dammm.... i own you a coffee :)


Thanks
:lol:

Glad it's resolved.

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked