Help with Installation - Must have missed something

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
georgepremier
Posts: 10
Joined: Fri May 05, 2006 5:14 am

Help with Installation - Must have missed something

Post by georgepremier »

I thought it was a straight forward installation but I have definately gone wrong somewhere. When I go to the web page I just get jargon (as below):

"Delete", 2 => "Enable", 3 => "Disable", 4 => "Change SNMP Options", 5 => "Clear Statistics" ); /* set default action */ if (!isset($_REQUEST["action"])) { $_REQUEST["action"] = ""; } switch ($_REQUEST["action"]) { case 'save': form_save(); break; case 'actions': form_actions(); break; case 'gt_remove': host_remove_gt(); header("Location: host.php?action=edit&id=" . $_GET["host_id"]); break; case 'query_remove': host_remove_query(); header("Location: host.php?action=edit&id=" . $_GET["host_id"]); break; case 'query_reload': host_reload_query(); header("Location: host.php?action=edit&id=" . $_GET["host_id"]); break; case 'query_verbose': host_reload_query(); header("Location: host.php?action=edit&id=" . $_GET["host_id"] . "&display_dq_details=true"); break; case 'edit': include_once("./include/top_header.php"); host_edit(); include_once("./include/bottom_footer.php"); break; default: include_once("./include/top_header.php"); host(); include_once("./include/bottom_footer.php"); break; } /* -------------------------- Global Form Functions -------------------------- */ function add_tree_names_to_actions_array() { global $device_actions; /* add a list of tree names to the actions dropdown */ $trees = db_fetch_assoc("select id,name from graph_tree order by name"); if (sizeof($trees) > 0) { foreach ($trees as $tree) { $device_actions{"tr_" . $tree["id"]} = "Place on a Tree (" . $tree["name"] . ")"; } } } /* -------------------------- The Save Function -------------------------- */ function form_save() { if ((!empty($_POST["add_dq_y"])) && (!empty($_POST["snmp_query_id"]))) { /* ================= input validation ================= */ input_validate_input_number(get_request_var_post("id")); input_validate_input_number(get_request_var_post("snmp_query_id")); input_validate_input_number(get_request_var_post("reindex_method")); /* ==================================================== */ db_execute("replace into host_snmp_query (host_id,snmp_query_id,reindex_method) values (" . $_POST["id"] . "," . $_POST["snmp_query_id"] . "," . $_POST["reindex_method"] . ")"); /* recache snmp data */ run_data_query($_POST["id"], $_POST["snmp_query_id"]); header("Location: host.php?action=edit&id=" . $_POST["id"]); exit; } if ((!empty($_POST["add_gt_y"])) && (!empty($_POST["graph_template_id"]))) { /* ================= input validation ================= */ input_validate_input_number(get_request_var_post("id")); input_validate_input_number(get_request_var_post("graph_template_id")); /* ==================================================== */ db_execute("replace into host_graph (host_id,graph_template_id) values (" . $_POST["id"] . "," . $_POST["graph_template_id"] . ")"); header("Location: host.php?action=edit&id=" . $_POST["id"]); exit; } if ((isset($_POST["save_component_host"])) && (empty($_POST["add_dq_y"]))) { $host_id = api_device_save($_POST["id"], $_POST["host_template_id"], $_POST["description"], $_POST["hostname"], $_POST["snmp_community"], $_POST["snmp_version"], $_POST["snmp_username"], $_POST["snmp_password"], $_POST["snmp_port"], $_POST["snmp_timeout"], (isset($_POST["disabled"]) ? $_POST["disabled"] : "")); if ((is_error_message()) || ($_POST["host_template_id"] != $_POST["_host_template_id"])) { header("Location: host.php?action=edit&id=" . (empty($host_id) ? $_POST["id"] : $host_id)); }else{ header("Location: host.php"); } } } /* ------------------------ The "actions" function ------------------------ */ function form_actions() { global $colors, $device_actions, $fields_host_edit; /* if we are to save this form, instead of display it */ if (isset($_POST["selected_items"])) { $selected_items = unserialize(stripslashes($_POST["selected_items"])); if ($_POST["drp_action"] == "2") { /* Enable Selected Devices */ for ($i=0;($i 0) { foreach ($data_sources as $data_source) { update_poller_cache($data_source["id"], false); } } } }elseif ($_POST["drp_action"] == "3") { /* Disable Selected Devices */ for ($i=0;($i 0) { foreach ($data_sources as $data_source) { api_data_source_disable($data_source["local_data_id"]); } } break; case '2': /* delete graphs/data sources tied to this device */ $data_sources = db_fetch_assoc("select data_local.id as local_data_id from data_local where " . array_to_sql_or($selected_items, "data_local.host_id")); if (sizeof($data_sources) > 0) { foreach ($data_sources as $data_source) { api_data_source_remove($data_source["local_data_id"]); } } $graphs = db_fetch_assoc("select graph_local.id as local_graph_id from graph_local where " . array_to_sql_or($selected_items, "graph_local.host_id")); if (sizeof($graphs) > 0) { foreach ($graphs as $graph) { api_graph_remove($graph["local_graph_id"]); } } break; } api_device_remove($selected_items[$i]); } }elseif (ereg("^tr_([0-9]+)$", $_POST["drp_action"], $matches)) { /* place on tree */ for ($i=0;($i
"; $host_array[$i] = $matches[1]; } $i++; } include_once("./include/top_header.php"); /* add a list of tree names to the actions dropdown */ add_tree_names_to_actions_array(); html_start_box("" . $device_actions{$_POST["drp_action"]} . "", "60%", $colors["header_panel"], "3", "center", ""); print "
\n"; if ($_POST["drp_action"] == "2") { /* Enable Devices */ print "

To enable the following devices, press the \"yes\" button below.

$host_list
"; }elseif ($_POST["drp_action"] == "3") { /* Disable Devices */ print "

To disable the following devices, press the \"yes\" button below.

$host_list
"; }elseif ($_POST["drp_action"] == "4") { /* change snmp options */ print "

To change SNMP parameters for the following devices, check the box next to the fields you want to update, fill in the new value, and click Save.

$host_list
"; $form_array = array(); while (list($field_name, $field_array) = each($fields_host_edit)) { if (ereg("^snmp_", $field_name)) { $form_array += array($field_name => $fields_host_edit[$field_name]); $form_array[$field_name]["value"] = ""; $form_array[$field_name]["description"] = ""; $form_array[$field_name]["form_id"] = 0; $form_array[$field_name]["sub_checkbox"] = array( "name" => "t_" . $field_name, "friendly_name" => "Update this Field", "value" => "" ); } } draw_edit_form( array( "config" => array("no_form_tag" => true), "fields" => $form_array ) ); }elseif ($_POST["drp_action"] == "5") { /* Clear Statisitics for Selected Devices */ print "

To clear the counters for the following devices, press the \"yes\" button below.

$host_list
"; }elseif ($_POST["drp_action"] == "1") { /* delete */ print "

Are you sure you want to delete the following devices?

$host_list
"; form_radio_button("delete_type", "2", "1", "Leave all graphs and data sources untouched. Data sources will be disabled however.", "1"); print "
"; form_radio_button("delete_type", "2", "2", "Delete all associated graphs and data sources.", "1"); print "
"; print " \n "; }elseif (ereg("^tr_([0-9]+)$", $_POST["drp_action"], $matches)) { /* place on tree */ print "

When you click save, the following hosts will be placed under the branch selected below.

$host_list

Destination Branch:
"; grow_dropdown_tree($matches[1], "tree_item_id", "0"); print "
jerem
Posts: 3
Joined: Mon Jan 22, 2007 2:48 am

Post by jerem »

It looks like your webserver does not handle php.

Enable php support in your webserver...
georgepremier
Posts: 10
Joined: Fri May 05, 2006 5:14 am

Post by georgepremier »

It should do I am using firefox
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

But firefox is the browser! Please check /etc/httpd/httpd.conf or the like on your cacti server
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests