diff --git a/doc/Installation/Installation-(Debian-Ubuntu).md b/doc/Installation/Installation-(Debian-Ubuntu).md index 5199499aa..94510473c 100644 --- a/doc/Installation/Installation-(Debian-Ubuntu).md +++ b/doc/Installation/Installation-(Debian-Ubuntu).md @@ -7,6 +7,8 @@ This host is where the MySQL database runs. It could be the same machine as your network management server (this is the most common initial deployment scenario). +> ** Whilst we are working on ensuring LibreNMS is compatible with MySQL strict mode, for now, please disable this after mysql is installed. + You are free to choose between using MySQL or MariaDB: **MySQL** @@ -45,6 +47,8 @@ Find the line: `bind-address = 127.0.0.1` Change `127.0.0.1` to the IP address that your MySQL server should listen on. Restart MySQL: +If you see a line that starts `sql-mode` then change this to `sql-mode=""`. + service mysql restart ### On the NMS ### diff --git a/doc/Installation/Installation-(RHEL-CentOS).md b/doc/Installation/Installation-(RHEL-CentOS).md index b6bd35701..f646d04fc 100644 --- a/doc/Installation/Installation-(RHEL-CentOS).md +++ b/doc/Installation/Installation-(RHEL-CentOS).md @@ -4,6 +4,10 @@ NOTE: These instructions assume you are the root user. If you are not, prepend ### On the DB Server ### +This host is where the MySQL database runs. It could be the same machine as your network management server (this is the most common initial deployment scenario). + +> ** Whilst we are working on ensuring LibreNMS is compatible with MySQL strict mode, for now, please disable this after mysql is installed. + You are free to choose between using MySQL or MariaDB: **MySQL** @@ -56,6 +60,8 @@ Add the following line: Change `` to the IP address that your MySQL server should listen on. Restart MySQL: +If you see a line that starts `sql-mode` then change this to `sql-mode=""`. + service mysqld restart ### On the NMS ### diff --git a/doc/Installation/Installation-Lighttpd-(Debian-Ubuntu).md b/doc/Installation/Installation-Lighttpd-(Debian-Ubuntu).md index 751b0c65e..f23863b44 100644 --- a/doc/Installation/Installation-Lighttpd-(Debian-Ubuntu).md +++ b/doc/Installation/Installation-Lighttpd-(Debian-Ubuntu).md @@ -4,6 +4,10 @@ ### On the DB Server ### +This host is where the MySQL database runs. It could be the same machine as your network management server (this is the most common initial deployment scenario). + +> ** Whilst we are working on ensuring LibreNMS is compatible with MySQL strict mode, for now, please disable this after mysql is installed. + You are free to choose between using MySQL or MariaDB: **MySQL** @@ -42,6 +46,8 @@ Find the line: `bind-address = 127.0.0.1` Change `127.0.0.1` to the IP address that your MySQL server should listen on. Restart MySQL: +If you see a line that starts `sql-mode` then change this to `sql-mode=""`. + service mysql restart ### On the NMS ### diff --git a/validate.php b/validate.php index 09bf0a258..0088e9411 100755 --- a/validate.php +++ b/validate.php @@ -13,13 +13,10 @@ * the source code distribution for details. */ -require 'includes/console_colour.php'; -$console_color = new Console_Color2(); - $options = getopt('m:h::'); if (isset($options['h'])) { - print $console_color->convert( + echo "\n Validate setup tool Usage: ./validate.php [-m ] [-h] @@ -31,7 +28,7 @@ if (isset($options['h'])) { Example: ./validate.php -m mail. " - ); + ; exit; } @@ -71,6 +68,12 @@ else { print_ok('Database connection successful'); } +// Test for MySQL Strict mode +$strict_mode = dbFetchCell("SELECT @@global.sql_mode"); +if(strstr($strict_mode, 'STRICT_TRANS_TABLES')) { + print_warn('You have MySQL STRICT_TRANS_TABLES enabled, it is advisable to disable this until full support has been added: https://dev.mysql.com/doc/refman/5.0/en/sql-mode.html'); +} + // Test transports if ($config['alerts']['email']['enable'] === true) { print_warn('You have the old alerting system enabled - this is to be deprecated on the 1st of June 2015: https://groups.google.com/forum/#!topic/librenms-project/1llxos4m0p4'); @@ -203,21 +206,18 @@ foreach ($modules as $module) { function print_ok($msg) { - global $console_color; - print $console_color->convert("%g[OK]%n %W$msg\n"); + echo "[OK] $msg\n"; }//end print_ok() function print_fail($msg) { - global $console_color; - print $console_color->convert("%r[FAIL]%n %W$msg\n"); + echo "[FAIL] $msg\n"; }//end print_fail() function print_warn($msg) { - global $console_color; - print $console_color->convert("%y[WARN]%n %W$msg\n"); + echo "[WARN] $msg\n"; }//end print_warn()