Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Tue Oct 21, 2014 11:47 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Cacti 0.8.7 installation from source completely hosed
PostPosted: Wed Nov 05, 2008 3:03 pm 
Offline

Joined: Tue Oct 21, 2008 6:16 pm
Posts: 47
Any ideas as to what is wrong here?
Code:
Error

This installation is already up-to-date. Click here to use cacti.
"; exit; }elseif (ereg("^0\.6", $old_cacti_version)) { print "

Error

You are attempting to install cacti " . $config["cacti_version"] . " onto a 0.6.x database. To continue, you must create a new database, import 'cacti.sql' into it, and update 'include/config.php' to point to the new database.
"; exit; }elseif (empty($old_cacti_version)) { print "

Error

You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:

mysql -u $database_username -p $database_default < cacti.sql

This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.
"; exit; } function verify_php_extensions() { $extensions = array("session", "sockets", "mysql", "xml"); $ok = true; $missing_extension = "

Error

The following PHP extensions are missing:

    * "; foreach ($extensions as $extension) { if (!extension_loaded($extension)){ $ok = false; $missing_extension .= "$extension
      "; } } if (!$ok) { print $missing_extension . "

Please install those PHP extensions and retry
"; } return $ok; } function db_install_execute($cacti_version, $sql) { $sql_install_cache = (isset($_SESSION["sess_sql_install_cache"]) ? $_SESSION["sess_sql_install_cache"] : array()); if (db_execute($sql)) { $sql_install_cache{sizeof($sql_install_cache)}[$cacti_version][1] = $sql; }else{ $sql_install_cache{sizeof($sql_install_cache)}[$cacti_version][0] = $sql; } $_SESSION["sess_sql_install_cache"] = $sql_install_cache; } function find_best_path($binary_name) { global $config; if ($config["cacti_server_os"] == "win32") { $search_paths = array("c:/usr/bin", "c:/cacti", "c:/rrdtool", "c:/spine", "c:/php", "c:/progra~1/php", "c:/net-snmp/bin", "c:/progra~1/net-snmp/bin", "d:/usr/bin", "d:/net-snmp/bin", "d:/progra~1/net-snmp/bin", "d:/cacti", "d:/rrdtool", "d:/spine", "d:/php", "d:/progra~1/php"); }else{ $search_paths = array("/bin", "/sbin", "/usr/bin", "/usr/sbin", "/usr/local/bin", "/usr/local/sbin"); } for ($i=0; $i 0) { if (ereg("^RRDtool 1\.3", $out_array[0])) { $input["rrdtool_version"]["default"] = "rrd-1.3.x"; }else if (ereg("^RRDtool 1\.2\.", $out_array[0])) { $input["rrdtool_version"]["default"] = "rrd-1.2.x"; }else if (ereg("^RRDtool 1\.0\.", $out_array[0])) { $input["rrdtool_version"]["default"] = "rrd-1.0.x"; } } } /* default value for this variable */ if (!isset($_REQUEST["install_type"])) { $_REQUEST["install_type"] = 0; } /* defaults for the install type dropdown */ if ($old_cacti_version == "new_install") { $default_install_type = "1"; }else{ $default_install_type = "3"; } /* pre-processing that needs to be done for each step */ if (empty($_REQUEST["step"])) { $_REQUEST["step"] = 1; }else{ if ($_REQUEST["step"] == "1") { $_REQUEST["step"] = "2"; }elseif (($_REQUEST["step"] == "2") && ($_REQUEST["install_type"] == "1")) { $_REQUEST["step"] = "3"; }elseif (($_REQUEST["step"] == "2") && ($_REQUEST["install_type"] == "3")) { $_REQUEST["step"] = "8"; }elseif (($_REQUEST["step"] == "8") && ($old_version_index <= array_search("0.8.5a", $cacti_versions))) { $_REQUEST["step"] = "9"; }elseif ($_REQUEST["step"] == "8") { $_REQUEST["step"] = "3"; }elseif ($_REQUEST["step"] == "9") { $_REQUEST["step"] = "3"; }elseif ($_REQUEST["step"] == "3") { $_REQUEST["step"] = "4"; } } if ($_REQUEST["step"] == "4") { include_once("../lib/data_query.php"); include_once("../lib/utility.php"); $i = 0; /* get all items on the form and write values for them */ while (list($name, $array) = each($input)) { if (isset($_POST[$name])) { db_execute("replace into settings (name,value) values ('$name','" . $_POST[$name] . "')"); } } setcookie(session_name(),"",time() - 3600,"/"); kill_session_var("sess_config_array"); kill_session_var("sess_host_cache_array"); /* just in case we have hard drive graphs to deal with */ $host_id = db_fetch_cell("select id from host where hostname='127.0.0.1'"); if (!empty($host_id)) { run_data_query($host_id, 6); } /* it's always a good idea to re-populate the poller cache to make sure everything is refreshed and up-to-date */ repopulate_poller_cache(); db_execute("delete from version"); db_execute("insert into version (cacti) values ('" . $config["cacti_version"] . "')"); header ("Location: ../index.php"); exit; }elseif (($_REQUEST["step"] == "8") && ($_REQUEST["install_type"] == "3")) { /* if the version is not found, die */ if (!is_int($old_version_index)) { print "

Error

Invalid Cacti version $old_cacti_version, cannot upgrade to " . $config["cacti_version"] . "
"; exit; } /* loop from the old version to the current, performing updates for each version in between */ for ($i=($old_version_index+1); $i

Cacti Installation Guide

Thanks for taking the time to download and install cacti, the complete graphing solution for your network. Before you can start making cool graphs, there are a few pieces of data that cacti needs to know.

Make sure you have read and followed the required steps needed to install cacti before continuing. Install information can be found for Unix and Win32-based operating systems.

Also, if this is an upgrade, be sure to reading the Upgrade information file.

Cacti is licensed under the GNU General Public License, you must agree to its provisions before continuing:

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.

Please select the type of installation

The following information has been determined from Cacti's configuration file. If it is not correct, please edit 'include/config.php' before continuing.

"; print "Database Hostname: $database_hostname
"; print "Database: $database_default
"; print "Server Operating System Type: " . $config["cacti_server_os"] . "
"; ?>

Make sure all of these values are correct before continuing.
[FOUND] "; }else{ $form_check_string = "[NOT FOUND] "; } } /* draw the acual header and textbox on the form */ print "

" . $form_check_string . $array["friendly_name"] . ""; if (!empty($array["friendly_name"])) { print ": " . $array["description"]; }else{ print "" . $array["description"] . ""; } print "
"; switch ($array["method"]) { case 'textbox': form_text_box($name, $current_value, "", "", "40", "text"); break; case 'filepath': form_filepath_box($name, $current_value, "", "", "40", "text"); break; case 'drop_array': form_dropdown($name, $array["array"], "", "", $current_value, "", ""); break; } print "
"; } $i++; }?>

NOTE: Once you click "Finish", all of your settings will be saved and your database will be upgraded if this is an upgrade. You can change any of the settings on this screen at a later time by going to "Cacti Settings" from within Cacti.

Upgrade results:
[Fail] "; $success_text = "[Success] "; if (isset($_SESSION["sess_sql_install_cache"])) { while (list($index, $arr1) = each($_SESSION["sess_sql_install_cache"])) { while (list($version, $arr2) = each($arr1)) { while (list($status, $sql) = each($arr2)) { if ($current_version != $version) { $version_index = array_search($version, $cacti_versions); $upgrade_results .= "

" . $cacti_versions{$version_index-1} . " -> " . $cacti_versions{$version_index} . "
\n"; } $upgrade_results .= "

" . (($status == 0) ? $fail_text : $success_text) . nl2br($sql) . "
\n"; /* if there are one or more failures, make a note because we are going to print out a warning to the user later on */ if ($status == 0) { $failed_sql_query = true; } $current_version = $version; } } } kill_session_var("sess_sql_install_cache"); }else{ print "No SQL queries have been executed."; } if ($failed_sql_query == true) { print "

WARNING: One or more of the SQL queries needed to upgraded your Cacti installation has failed. Please see below for more details. Your Cacti MySQL user must have SELECT, INSERT, UPDATE, DELETE, ALTER, CREATE, and DROP permissions. You should try executing the failed queries as 'root' to ensure that you do not have a permissions problem.
\n"; } print $upgrade_results; ?>

Important Upgrade Notice

Before you continue with the installation, you must update your /etc/crontab file to point to poller.php instead of cmd.php.

See the sample crontab entry below with the change made in red. Your crontab line will look slightly different based upon your setup.

*/5 * * * * cactiuser php /var/www/html/cacti/poller.php > /dev/null 2>&1

Once you have made this change, please click Next to continue.

finishnext.gif" alt="FinishNext">
">


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2008 5:41 pm 
Offline
Developer/Forum Admin
User avatar

Joined: Mon Nov 17, 2003 6:35 pm
Posts: 5904
Location: Michigan, USA
Is this what you got in the browser?? If so, you need to install PHP.

_________________
Tony Roman
Experience is what causes a person to make new mistakes instead of old ones.
There are only 3 way to complete a project: Good, Fast or Cheap, pick two.
With age comes wisdom, what you choose to do with it determines whether or not you are wise.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2008 6:03 pm 
Offline

Joined: Tue Oct 21, 2008 6:16 pm
Posts: 47
php is installed. I tried version four and five. It shows as loaded in httpd logs as well


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 05, 2008 6:53 pm 
Offline
Cacti Moderator
User avatar

Joined: Sat May 08, 2004 12:44 pm
Posts: 11369
Location: USA
Well obviously it's not configured properly in the web server :P

a phpinfo page show everything loaded properly?

_________________

| Scripts: Monitor processes | RFC1213 MIB | DOCSIS Stats | Dell PowerEdge | Speedfan | APC UPS | DOCSIS CMTS | 3ware | Motorola Canopy |
| Guides: Windows Install | [HOWTO] Debug Windows NTFS permission problems |
| Tools: Windows All-in-one Installer |


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 24, 2008 6:07 pm 
Offline

Joined: Tue Oct 21, 2008 6:16 pm
Posts: 47
I found out the cacti subversion repository was 0wned when this was occurring. That might have had something to do with it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot], Exabot [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group