Commit Graph
196 Commits
Author SHA1 Message Date
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
cigamit 4c9d109f06 Add transaction support to database library 2018-05-10 07:28:10 -05:00
Jimmy Conner 8f4d2cfc78 Fix for PR #1587 2018-04-30 17:52:54 -05:00
Francisco Javier 6abe0913f5 Fix open database when in home directory there is file or directory named localhost (#1587)
Nice tweak!
2018-04-28 10:36:30 -05:00
cigamit dfca74f360 Final fix for issue #1467
This setting forces the database connection to use the same timezone
specified in the poller table for remote data collectors therefore
allowing the data collectors to be in their own timezones and not all
UTC.

Add one slight wording change for the data collector name.
2018-04-22 08:07:32 -05:00
cigamit 901537e1b6 Merge remote-tracking branch 'refs/remotes/origin/develop' into feature/1.2.x
# Conflicts:
#	docs/CHANGELOG
#	lib/ldap.php
2018-03-03 13:10:27 -06:00
netniV 3433f26ad6 Feature #1408 - Update SQL / Backtrace to use new clean_up_lines() function (#1435) 2018-03-03 08:26:46 -06:00
netniV 4834d55983 issue #1421: When SQL had all bad modes, missing variable warning was generated (#1425)
* issue #1421: When SQL had all bad modes, missing variable warning was generated

* Update database.php
2018-03-02 06:41:09 -06:00
cigamit 62615311b5 Merge remote-tracking branch 'refs/remotes/origin/develop' into feature/1.2.x
# Conflicts:
#	docs/CHANGELOG
2018-01-06 14:08:07 -06:00
Tony Roman 519b35f5cd Update copyright to 2018 2018-01-06 09:10:15 -05:00
cigamit 99d19d5312 Correct whitespace and formatting issues
Whitespace and formatting in lib
2017-11-19 14:35:17 -06:00
Wolfgang Stöggl 4a1a15d72c Correct spelling of RRDtool (#1038)
- Change RRDTool -> RRDtool with a lowercase t.
- Replace in all files except *.mo, *.po, *.pot
2017-10-16 11:32:05 -04:00
Patrick c3419aa36e Various fixes && Updated Translations (#1032)
Good catch on the bug fixes too.  Hard to spot.
_______________________________________________________

* Updated Dutch translations
- Fixed i18n

* Defined fields in queries

* Fixed changelog

* Updated Dutch translations

* Various fixes

All committed files:
- true|false to lowercase

add_perms.php:
- displayGroups() was undefined

add_tree.php:
- duplicate case for '--quiet'

repair_templates.php:
- correction function call to diaplay_version()

gettext.php:
- PHP EOF unneeded

* Updated Dutch translations
- Updated Dutch translations with latest cacti.pot file

* Updated Dutch translations
- Fixed conflicts in translations
2017-10-15 07:27:25 -05:00
cigamit f97dd82a48 Resolving Issue #964
Bad SQL modes not being replaced as expected
Emergency fix.
2017-09-11 16:18:10 -05:00
cigamit 8173ec8b1b Resolving database corruption issue due to MariaDB/MySQL sql_mode
This change also will speed up initial login under certain
circumstances.
2017-09-08 18:35:19 -05:00
cigamit fb0274f09e Resolving Issue #891
lib/database.php unable to connecto to MySQL when using port different
than 3306
2017-08-05 10:50:18 -05:00
cigamit 678716ae35 Optimize lib/database.php for readability 2017-05-15 17:56:18 -05:00
Tony Roman 8a179d7d7f Fix up to move if elseif else blocks to PSR 2017-05-07 19:57:36 -04:00
cigamit e1f010f241 Resolving Issue #622
Can not connec to MySQL over a socket
2017-04-26 06:03:07 -05:00
Patrick 97b666f724 Update database.php
Restoring db_add_index()
2017-04-22 15:16:36 +02:00
Patrick aea4b7c40b Database optimisations
- Removed unused functions
- Double check of !is_object() optimised
- Resolved some alignment issues
2017-04-16 11:51:51 +02:00
patrick 467ab201aa executing 4x1 str_replace() instead of 4x3 2017-04-06 18:05:33 +02:00
cigamit 8c2150c7aa Log full database errors in LOW or higher logging mode
Makes debugging easier
2017-02-18 13:20:21 -06:00
cigamit 06de177235 Add DB Query count for debugging purposes 2017-02-05 13:04:04 -06:00
cigamit 485a3b3be8 Make the db_add_index safer from reserved words 2017-02-04 14:02:02 -06:00
cigamit 3ab2feaedf add db_add_index() function to core
Was included in the installer, but not in the core api.
2017-02-04 13:55:56 -06:00
cigamit e4c27e4555 Another check to prevent invalid date format errors
This is related to Issue #227
2017-01-23 17:10:59 -06:00
cigamit 2376e9d48b Remove STRICT mode 2017-01-22 17:14:45 -06:00
cigamit 8e239faa74 Add comment field to db functions 2017-01-14 00:07:21 -06:00