Re-purpose the existing php_snmp_support config value to allow
administrators to disable the built-in SNMP extension.
It can be desirable to force use of the Net-SNMP in some configurations,
particularly when IPv6 is in use. This allows the administrator to set
$php_snmp_support = false in config.php, which will then force use of
the Net-SNMP binaries tools.
This commit corrects a previous unseen issue where the PHP environment at command line level is being populated with environment variables normally only seen when called from a web server.
issue#2304: Installation progress stays at 0%
issue#2311: Unable to update PHP location during installation due to incorrect CLI environment
The new check uses the php_sapi_name() function to verify that we are indeed at 'cli' level. All other values returned by php_sapi_name are considered non-cli including 'cli-server' which is for client/server scenarios.
Most checks have now been replaced by a single defintion ('CACTI_CLI') to define whether in CLI mode. If a script is only to be called from CLI it must either defined 'CACTI_CLI_ONLY' or include include/cli_check.php instead of include/global.php.
- Add external link support in menu (probably need more work)
- Added Support -> Documentation menu item
- Added Support -> Users Community menu item
- Made documentation loading dynamic, if release documentation is
not included it will redirect to Github documenation
This patch adds functionality to control the debugging of low level routines
via defines within the config.php file. In order to allow flexibility, if
these are defined, variables within the $config array are primed as true,
otherwise false.
These elements within the $config array are defined in uppercase to highlight
the difference between these are other ordinary configuration optios.
Should a function or program need to enable debugging of these various
options, simply setting the value to true in the $config array will enable
logging from that point. Inversely, setting it to false will stop logging
from that point.
The only option that is of limited use is DEBUG_READ_CONFIG_OPTION_DB_OPEN
that will only work up to the database being open. Setting this to true
after the database has already been opened will not automatic turn off the
companion option DEBUG_READ_CONFIG_OPTION since the db_connect_real() will
not be called again.
The list of options and their functionality are:
- DEBUG_READ_CONFIG_OPTION : record use of read_config_option()
to cacti-option.log in the system temporary folder
- DEBUG_READ_CONFIG_OPTION_DB_OPEN : Once the database has been
successfully opened, disable DEBUG_READ_CONFIG_OPTION
- DEBUG_SQL_CMD : Always write a copy of the SQL being requested
to the cacti-sql.log file in the system temporary folder
- DEBUG_SQL_FLOW : Write flow of db_xxx calls to the cacti-sql.log
in the system temporary folder.
The system temporary folder is normally set to one of the following:
- Linux, CLI: /tmp/
- Linux, WEB: Apache/Ngix's temporary folder
- Windows, CLI: %TEMP%
- Windows, WEB: Temp folder of web user or %WINDIR%\TEMP
* Fixes for Issues 1781, 1782 and 1784
This patch corrects the following issues:
- #1782 During Install, changing the Theme from Modern to another theme has no
effect
- #1784 During Install, changing the Language from one to another has no
effect
- #1781 Installer does not warn when mysql optimizations not set
As part of #1781's fixes, a new warning icon is displayed instead of a thumbs
up or down. Additionally, recommendations have been revamped so that the ones
which are optionally (and some even state can be ignored) are now optional!
Also, introduced the correct calculation for innodb instances by taking the
buffer size during a previous recommendation and calculating from that. If
the buffer size is never found or the calcuation finds less than 1 instances
are recommended, a minimum of 1 is set.
The main reason for #1782 and #1784's issues were caused by renaming index.php
to install.php as part of the recent security update (see PR #1747). Updated
the javascript to use the correct install.php and then removed some extra data
that was being returned outside of StepData unnecessarily.
* Further fixes
This update corrects a number of issues with the database upgrading code, adds
the 'debug' plugin from cigamit, improves database functions to be more
consistent with errors across all functions and various installer based fixes
for the display and update of database upgrades.
It also brings a more visual response to the cli/upgrade_database.php so that
end users are not left wondering if something is happening. Also, reviewed
all upgrade scripts to ensure that an upgrade from 0.8.8 through to 1.2.0 is
possible even if a previous database upgrade have been done.
* Fix QA issue with 'path_cactilog'
Due to some code reshuffle and testing, found that the above setting was being
read via read_config_option() before there was a database open so no path was
ever detected unless the force option was used.
* Issue #1723 - die() messages should include \n for better logging
This corrects issue #1723 where die() messages appear in log files without a new line character causing logs to appear corrupted.
* Replace \n with PHP_EOF to be platform independant.
* issue #1347 - Update automation logging to work better
* Remove debug code from lib/clog_webapi.php
* Further automation updates to include PID for diagnoses/filtering
* Ensure we have rows before attempting to loop through them
* Fix CI error
* update chines po file (#1403)
Signed-off-by: snsupersharp <snsupersharp@163.com>
* Typo in layout.js
Correcting CVE-2009-4112. This CVE correction will provide some level
of protection to Cacti when unauthorized changes are made to a Data
Input Method.
If the plugin architecture does not exist, install will fail. Also
found php function version_compare not working in PHP 5.3.x.
There were additionally issues with the upgrade functions as well.
Resolving those too.