Cacti Server showing source code not Website

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
tmallette
Posts: 2
Joined: Tue Sep 19, 2017 10:15 pm

Cacti Server showing source code not Website

Post by tmallette »

I'm new to Cacti and I installed it on Ubuntu 16.04 server with Cacti 1.1.12. When I try to go the webpage to finish the install I only get what I'm calling the source code and not a web page. I'm hoping someone can help me troubleshoot this problem. I'm posting s screen shot of what I'm seeing.

<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2017 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDTool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/

include('./include/auth.php');
top_header();

api_plugin_hook('console_before');

function render_external_links($style = 'FRONT') {
global $config;

$consoles = db_fetch_assoc_prepared('SELECT id, contentfile FROM external_links WHERE style = ?', array($style));
if (sizeof($consoles)) {
foreach($consoles as $page) {
if (is_realm_allowed($page['id']+10000)) {
if (preg_match('/^((((ht|f)tp(s?))\:\/\/){1}\S+)/i', $page['contentfile'])) {
print '<iframe class="content" src="' . $page['contentfile'] . '" frameborder="0"></iframe>';
} else {
print '<div id="content">';

$file = $config['base_path'] . "/include/content/" . $page['contentfile'];

if (file_exists($file)) {
include_once($file);
} else {
print '<h1>The file \'' . $page['contentfile'] . '\' does not exist!!</h1>';
}

print '</div>';
}
}
}
}
}

render_external_links('FRONTTOP');

if (read_config_option('hide_console') != '1') {
?>
<table class='cactiTable'>
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Re: Cacti Server showing source code not Website

Post by JJX »

You apache is not configured correctly for php files.
cacti rulez!
tmallette
Posts: 2
Joined: Tue Sep 19, 2017 10:15 pm

Re: Cacti Server showing source code not Website

Post by tmallette »

Hello JJX

Would you be able to point me in the direction of where to start trying to troubleshoot the Apache errors?
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Re: Cacti Server showing source code not Website

Post by JJX »

You can easily find numerous tutorials on google.com
Search "ubuntu configure apache php" or "how to enable php on apache"
cacti rulez!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest