Commit Graph
224 Commits
Author SHA1 Message Date
TheWitness df54a4a3f3 Updating copright years 2021-01-01 20:28:58 -05:00
YongBoLiuandyboliu a3319e80ce Fix3999 (#4000)
* feature 3965, Add a value check if the input field is textbox in settings

* feature 3965, revert

* Fix #3999

* Refix issue #3999, wrap mysqldump into db_dump_data()

* Fix issue #3999, update the db_dump_data() to minimize password be caught.

Co-authored-by: yboliu <yboliu@oc8636837557.ibm.com>
2020-12-30 18:03:11 -05:00
TheWitness c57a066226 Additional changes around #3985
* Doing collate and charset as separate transactions
2020-12-19 12:15:15 -05:00
TheWitness b2fce0ac75 Fixing Issue #3985
Update database library function to properly handle collate
2020-12-05 10:38:54 -05:00
TheWitness 2305809401 Fixing Issue #3474
The SSL option to set the SSL_CA should be optional for Client Connections
2020-04-18 09:24:14 -04:00
TheWitness a43a3ced2b Correcting QA issue 2020-03-15 12:29:54 -04:00
TheWitness efa46bbcf6 More upgrade QA
* Upgrading from pre 1.x should properly work now with little or no errors.
2020-03-15 11:17:12 -04:00
cigamit 5c35c2d9b0 Light QA on lack of initial database permissions 2020-01-23 06:40:25 -06:00
TheWitness 0e192c59e3 Resolving Issue #3193
Starting with MySQL 5.7 some sql_mode variables are required for some plugins.
2020-01-15 19:48:57 -05:00
netniV 1a61e1f0ef Fix issues when config.php is unreadable
This commit adds a notice when configphp is present but unreadable.  It also adds the ability to display any database connection errors that occur within db_connect_real for diagnostic purposes.  These notices are only presented to the end user when the appropriate flag is set as most users do not need them.

Closes #3181 and closes #3182
2020-01-12 12:22:15 +00:00
netniV 4fa9a68fb3 Update copyright to 2020 2020-01-12 12:19:49 +00:00
netniV bf680ebd0f Passing glue string after array is deprecated (PHP 7.4)
Closes #3151
2019-12-19 14:11:06 +00:00
cigamit 61a8a8f059 Resolving Issue #3060
New tables on some MariaDB versions are created by default using
Compact format instead of Dynamic
2019-11-29 13:22:47 -06:00
cigamit 410472ee07 Resolving Issue #3070
Improve database logging when a crashed table is encountered
2019-11-09 09:18:04 -06:00
netniV 1f626f3c7a Calls to _db_replace() are not consistent resulting in warnings
Closes #2722
2019-06-09 21:02:03 +00:00
cigamit e33687ef46 Resolving Issue #2635
Multiple Database Sync Issues in v1.2.x
2019-04-22 19:42:54 -05:00
cigamit 6ecbe88ad3 Resolving Issue #2609
SQL error if upgrade cacti from pre-1.2.0
2019-04-10 11:13:57 -05:00
cigamit f408465fa6 Resolving Issue #2622
Various PHP undefined variable in database.php
2019-04-10 10:45:28 -05:00
netniV 013c8eb644 Resolves multiple issues:
-issue#2590: Language selection is not working as expected
-issue#2605: When checking for tables to upgrade, undefined variable $config error occurs
-issue#2608: db_update_table() function should not require an engine type or comment
-issue#2610: Data Sources troubleshooter generates warning that each() function is deprecated

Closes #2590, 2605, 2608, 2610
2019-04-04 11:49:59 +00:00
netniV 6c7b2ab95e Missing configuration defaults prevent installations/upgrades without showing reason
Closes #2555
2019-03-23 11:04:57 +00:00
Matthew Horan 983d9f29aa Make the local poller timezone configurable (#2517)
Some cloud SQL providers do not make the textual default_time_zone
configurable. While a manual offset value (e.g. -04:00) can be
configured for this value, that's not too convenient in places that
observe DST.

By exposing the poller timezone configuration for all pollers, it's
possible to override this default with a textual zone name if desired.
2019-03-16 18:03:34 -05:00
netniV e7b8158803 Resolving issue #2360
When retrieving database / table / column information, schema name is not always applied.
2019-02-08 22:45:23 +00:00
cigamit 4452f86b69 Resolving Issue #2374
lib/database.php: is_file and open_basedir
2019-02-05 07:13:42 -06:00
cigamit e1e336f301 Add simple function to database library to recall a session variable 2019-01-31 07:17:14 -06:00
cigamit 792ed64818 Correct undefined variable error 2019-01-27 12:32:33 -06:00
cigamit edc736d871 Additional fixes for Issue #2326
This allows the row format to be dynamic only when the
innodb_file_format is Barracuda, and corrects a bug in detecting MySQL
vs. MariaDB in the version string.
2019-01-26 09:42:37 -06:00
cigamit 683a1de0c4 Partial resolution to Issue #2326
Upgrade errors due to key length.  We will have to mandate a minimum to
implement these changes.
2019-01-26 09:01:31 -06:00
netniV b8c579b129 Update copyright notices for 2019 2019-01-25 08:06:11 +00:00
cigamit 75ef8b4d5c -issue: timestamp columns with CURRENT_TIMESTAMP cant be created
Additional bracketing for readability
2019-01-18 18:03:32 -06:00
cigamit f46036d576 Missing error display function. 2019-01-02 06:33:08 -06:00
cigamit 58b2457992 Resolving Issue #2250
[1.2.0 Beta 4] Database creation functions do not support charset or
partial indexes
2018-12-31 12:11:45 -06:00
cigamit ac782b007b Resolving Issues with php 5.4 and error handler 2018-10-10 03:38:05 -05:00
cigamit ec25ba7b89 Revert "Change error handler to be compatible with php 5.4"
This reverts commit c8b33286de.
2018-10-10 03:36:30 -05:00
cigamit c8b33286de Change error handler to be compatible with php 5.4 2018-10-10 03:33:35 -05:00
netniV 155922c91b Under PHP 5, scalars cannot be a type definition causing a fatal error 2018-10-10 08:26:17 +00:00
netniV 31675a1935 Resolving issue #2007 2018-10-10 07:17:22 +00:00
Mark Brugnoli-Vinten f4314c5a65 More QA Fixes (#2013)
* Correct issue with template and table selections

* More QA on Tables

* Make LDAP slowness not block sessions

* Resolving issue #2015

* Add some extra logging items for RECACHE event
2018-10-06 10:23:50 -05:00
Mark Brugnoli-Vinten 1bb88150f4 Minor QA fixes (#2003) 2018-09-30 08:55:51 -05:00
Mark Brugnoli-Vinten 7cd6e6090d Fix debug_backtrace, add PHP recommendations, etc (#2001) 2018-09-29 19:11:08 -05:00
Mark Brugnoli-Vinten 8741add63d Minor QA fixes, sql_save causing issues in plugin messages (#1962)
* Minor QA fixes, sql_save causing issues in plugin messages

* Fix issue were link wasn't a link

* Update POT files
2018-09-23 13:30:57 -05:00
Mark Brugnoli-Vinten 39efc75c49 Resolving issues #1931, #1932, #1933, #1934, #1935, #1938 and #1939 (#1937)
* Resolving issues #1931, #1932, #1933, #1934, #1935, #1938 and #1939

* Update import.php
2018-09-16 13:22:32 -05:00
Mark Brugnoli-Vinten 1ca32862a9 Resolving issue #1920 (#1922)
* Resolving issue #1920

* Minor QA issue
2018-09-14 20:59:52 -05:00
Mark Brugnoli-Vinten e48f788d92 Resolving issue #1870 (#1917) 2018-09-12 20:01:18 -05:00
Jimmy Conner fb7fc6e0b1 Fix 'sql_save' checking if table exists 2018-08-11 22:37:40 -05:00
Alex f17625597d Fixes issue 1814 (#1815) 2018-08-07 17:05:58 -05:00
Mark Brugnoli-Vinten 147c152eb7 Feature #1806 - Control of low level debug (#1807)
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
2018-08-07 07:18:20 -05:00
Mark Brugnoli-Vinten 15ff2d4d74 Resolving issue #1802 (#1803)
This patch should correct some functionality issues within read_config_option()
so that settings are not incorrectly primed if the databsae is not opened yet
as noted in #1802
2018-08-06 17:09:37 -05:00
Mark Brugnoli-Vinten 6e1b8431b7 Fixes for Issues 1781, 1782 and 1784 (#1785)
* 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.
2018-08-05 10:43:01 -05:00
Mark Brugnoli-Vinten ed57331dfd Fixes for Issue 1729 and 1730 (#1747)
* Fixes QA issues with upgrades from older versions

* Redirect install/index.php to install/install.php

* Further QA fixes

* Ensure upgrade matches new password field length

* Add 'Installation In Progress' message

* Fix QA issues
2018-07-25 08:45:41 -04:00
cigamit 179cd07b73 Resolving Issue #1711
Support specifying MySQL SSL file paths in the database API
2018-07-14 14:53:46 -05:00