diff --git a/pandora_agents/unix/DEBIAN/control b/pandora_agents/unix/DEBIAN/control
index 444617c108..1edc74b63f 100644
--- a/pandora_agents/unix/DEBIAN/control
+++ b/pandora_agents/unix/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-agent-unix
-Version: 7.0NG.729-181114
+Version: 7.0NG.729-181115
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_agents/unix/DEBIAN/make_deb_package.sh b/pandora_agents/unix/DEBIAN/make_deb_package.sh
index 6f69a1b2f6..fdba2aa12a 100644
--- a/pandora_agents/unix/DEBIAN/make_deb_package.sh
+++ b/pandora_agents/unix/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.729-181114"
+pandora_version="7.0NG.729-181115"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent
index b41ef8ab21..d878ae93cb 100755
--- a/pandora_agents/unix/pandora_agent
+++ b/pandora_agents/unix/pandora_agent
@@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.729';
-use constant AGENT_BUILD => '181114';
+use constant AGENT_BUILD => '181115';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;
diff --git a/pandora_agents/unix/pandora_agent.redhat.spec b/pandora_agents/unix/pandora_agent.redhat.spec
index 5055aa9f22..cd06bf14f7 100644
--- a/pandora_agents/unix/pandora_agent.redhat.spec
+++ b/pandora_agents/unix/pandora_agent.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.729
-%define release 181114
+%define release 181115
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent.spec b/pandora_agents/unix/pandora_agent.spec
index 983a2c6857..6b7ae9d5f2 100644
--- a/pandora_agents/unix/pandora_agent.spec
+++ b/pandora_agents/unix/pandora_agent.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.729
-%define release 181114
+%define release 181115
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}
diff --git a/pandora_agents/unix/pandora_agent_installer b/pandora_agents/unix/pandora_agent_installer
index 17a1cd8211..aa84a1f2a1 100755
--- a/pandora_agents/unix/pandora_agent_installer
+++ b/pandora_agents/unix/pandora_agent_installer
@@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.729"
-PI_BUILD="181114"
+PI_BUILD="181115"
OS_NAME=`uname -s`
FORCE=0
diff --git a/pandora_agents/win32/installer/pandora.mpi b/pandora_agents/win32/installer/pandora.mpi
index 720743837a..8fe36853ac 100644
--- a/pandora_agents/win32/installer/pandora.mpi
+++ b/pandora_agents/win32/installer/pandora.mpi
@@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
-{181114}
+{181115}
ViewReadme
{Yes}
diff --git a/pandora_agents/win32/pandora.cc b/pandora_agents/win32/pandora.cc
index 69e4209b74..c8518dc9ee 100644
--- a/pandora_agents/win32/pandora.cc
+++ b/pandora_agents/win32/pandora.cc
@@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
-#define PANDORA_VERSION ("7.0NG.729(Build 181114)")
+#define PANDORA_VERSION ("7.0NG.729(Build 181115)")
string pandora_path;
string pandora_dir;
diff --git a/pandora_agents/win32/versioninfo.rc b/pandora_agents/win32/versioninfo.rc
index ebc8ccf35d..98cb7fec71 100644
--- a/pandora_agents/win32/versioninfo.rc
+++ b/pandora_agents/win32/versioninfo.rc
@@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
- VALUE "ProductVersion", "(7.0NG.729(Build 181114))"
+ VALUE "ProductVersion", "(7.0NG.729(Build 181115))"
VALUE "FileVersion", "1.0.0.0"
END
END
diff --git a/pandora_console/DEBIAN/control b/pandora_console/DEBIAN/control
index 354e8f7821..80c9cb71a3 100644
--- a/pandora_console/DEBIAN/control
+++ b/pandora_console/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-console
-Version: 7.0NG.729-181114
+Version: 7.0NG.729-181115
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_console/DEBIAN/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh
index a228c80217..f1f3a1183f 100644
--- a/pandora_console/DEBIAN/make_deb_package.sh
+++ b/pandora_console/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.729-181114"
+pandora_version="7.0NG.729-181115"
package_pear=0
package_pandora=1
diff --git a/pandora_console/general/php7_message.php b/pandora_console/general/php7_message.php
new file mode 100644
index 0000000000..6df5706598
--- /dev/null
+++ b/pandora_console/general/php7_message.php
@@ -0,0 +1,67 @@
+';
+ echo '
';
+ echo "
" . __('For a correct operation of PandoraFMS you will have to update php to version 7.0 or later.') . "
";
+ echo "
" . __(' If you don\'t update, you will lose functionalities:') . "
";
+ echo "
";
+ echo "- " . __('Report download in PDF format') . "
";
+ echo "- " . __('Sending emails') . "
";
+ echo "- " . __('Metaconsole Collections') . "
";
+ echo "- " . '...' . "
";
+ echo "
";
+ echo '
'.__('Access Help').'
';
+ echo '
';
+ echo "";
+ echo html_print_image('images/icono_warning_mr.png', true, array("alt" => __('Warning php version'), "border" => 0));
+ echo "
";
+echo '';
+?>
+
+
diff --git a/pandora_console/godmode/update_manager/update_manager.php b/pandora_console/godmode/update_manager/update_manager.php
index c54aedc3bb..97dbaad48f 100644
--- a/pandora_console/godmode/update_manager/update_manager.php
+++ b/pandora_console/godmode/update_manager/update_manager.php
@@ -26,6 +26,12 @@ if (! check_acl ($config['id_user'], 0, "PM") && ! is_user_admin ($config['id_us
return;
}
+$php_version = phpversion();
+$php_version_array = explode('.', $php_version);
+if($php_version_array[0] < 7){
+ include_once("general/php7_message.php");
+}
+
$tab = get_parameter('tab', 'online');
$buttons = array(
diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php
index 6b31b39b6e..bdc0562fcf 100644
--- a/pandora_console/include/config_process.php
+++ b/pandora_console/include/config_process.php
@@ -22,7 +22,7 @@
/**
* Pandora build version and version
*/
-$build_version = 'PC181114';
+$build_version = 'PC181115';
$pandora_version = 'v7.0NG.729';
// Do not overwrite default timezone set if defined.
diff --git a/pandora_console/include/db/mysql.php b/pandora_console/include/db/mysql.php
index 45f0a22db6..9982ec24fb 100644
--- a/pandora_console/include/db/mysql.php
+++ b/pandora_console/include/db/mysql.php
@@ -14,7 +14,7 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
-function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = "utf8") {
+function mysql_connect_db($host = null, $db = null, $user = null, $pass = null, $port = null, $charset = null) {
global $config;
if ($host === null)
@@ -42,7 +42,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
}
db_change_cache_id ($db, $host);
- mysqli_set_charset($connect_id, $charset);
+ if (isset($charset)) {
+ mysqli_set_charset($connect_id, $charset);
+ }
mysqli_select_db($connect_id, $db);
}
@@ -54,7 +56,9 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
db_change_cache_id ($db, $host);
- @mysql_set_charset($connect_id, $charset);
+ if (isset($charset)) {
+ @mysql_set_charset($connect_id, $charset);
+ }
mysql_select_db($db, $connect_id);
}
diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php
index aeab684350..8e0cf5898d 100644
--- a/pandora_console/include/functions_config.php
+++ b/pandora_console/include/functions_config.php
@@ -2231,6 +2231,29 @@ function config_check () {
__("phantomjs is not installed"));
}
}
+
+
+ $php_version = phpversion();
+ $php_version_array = explode('.', $php_version);
+ if($php_version_array[0] < 7){
+ if ($config['language'] == 'es') {
+ $url_help = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_es:Instalaci%C3%B3n_y_actualizaci%C3%B3n_PHP_7';
+ }
+ else{
+ $url_help = 'https://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:_PHP_7';
+ }
+
+ set_pandora_error_for_header(
+ __('For a correct operation of PandoraFMS you will have to update php to version 7.0 or later.') . "
" .
+ __(' If you don\'t update, you will lose functionalities:') . "
" .
+ "- " . __('Report download in PDF format') . "
" .
+ "- " . __('Sending emails') . "
" .
+ "- " . __('Metaconsole Collections') . "
" .
+ "- " . '...' . "
" .
+ "
" .
+ ''.__('Access Help').'',
+ __("REQUIRED PHP UPDATE"));
+ }
}
function config_return_in_bytes($val) {
diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php
index eca1a67eeb..386673dc53 100644
--- a/pandora_console/include/functions_db.php
+++ b/pandora_console/include/functions_db.php
@@ -43,7 +43,7 @@ function db_select_engine() {
}
}
-function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = "utf8") {
+function db_connect($host = null, $db = null, $user = null, $pass = null, $port = null, $critical = true, $charset = null) {
global $config;
static $error = 0;
diff --git a/pandora_console/include/functions_snmp.php b/pandora_console/include/functions_snmp.php
index fe5333f162..769524744c 100644
--- a/pandora_console/include/functions_snmp.php
+++ b/pandora_console/include/functions_snmp.php
@@ -25,6 +25,7 @@
* @param string Snmp especific OID.
*/
function snmp_generate_trap($snmp_host_address, $snmp_community, $snmp_oid, $snmp_agent, $snmp_data, $snmp_type) {
+ global $config;
// Call snmptrap
if (empty($config['snmptrap'])) {
switch (PHP_OS) {
@@ -35,7 +36,9 @@ function snmp_generate_trap($snmp_host_address, $snmp_community, $snmp_oid, $snm
$snmptrap_bin = '/usr/pkg/bin/snmptrap';
break;
default:
- $snmptrap_bin = 'snmptrap';
+ $snmptrap_bin = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'
+ ? 'C:\Windows\snmptrap.exe'
+ : 'snmptrap';
break;
}
}
diff --git a/pandora_console/index.php b/pandora_console/index.php
index 9111aec168..69bcc7c683 100755
--- a/pandora_console/index.php
+++ b/pandora_console/index.php
@@ -940,7 +940,12 @@ if (get_parameter ('login', 0) !== 0) {
include_once("general/login_help_dialog.php");
}
-
+
+ $php_version = phpversion();
+ $php_version_array = explode('.', $php_version);
+ if($php_version_array[0] < 7){
+ include_once("general/php7_message.php");
+ }
}
// Header
diff --git a/pandora_console/install.php b/pandora_console/install.php
index 7d1636f1bf..c595a07b88 100755
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -71,7 +71,7 @@
\ No newline at end of file
+
diff --git a/pandora_console/pandora_console.redhat.spec b/pandora_console/pandora_console.redhat.spec
index 8113075539..948dddcb3a 100644
--- a/pandora_console/pandora_console.redhat.spec
+++ b/pandora_console/pandora_console.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.729
-%define release 181114
+%define release 181115
# User and Group under which Apache is running
%define httpd_name httpd
diff --git a/pandora_console/pandora_console.spec b/pandora_console/pandora_console.spec
index 2be419b42f..6eba7b59a8 100644
--- a/pandora_console/pandora_console.spec
+++ b/pandora_console/pandora_console.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.729
-%define release 181114
+%define release 181115
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2
diff --git a/pandora_server/DEBIAN/control b/pandora_server/DEBIAN/control
index a112fcfbe8..b893158fb7 100644
--- a/pandora_server/DEBIAN/control
+++ b/pandora_server/DEBIAN/control
@@ -1,5 +1,5 @@
package: pandorafms-server
-Version: 7.0NG.729-181114
+Version: 7.0NG.729-181115
Architecture: all
Priority: optional
Section: admin
diff --git a/pandora_server/DEBIAN/make_deb_package.sh b/pandora_server/DEBIAN/make_deb_package.sh
index 2c5b3d3b1f..5031245c05 100644
--- a/pandora_server/DEBIAN/make_deb_package.sh
+++ b/pandora_server/DEBIAN/make_deb_package.sh
@@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-pandora_version="7.0NG.729-181114"
+pandora_version="7.0NG.729-181115"
package_cpan=0
package_pandora=1
diff --git a/pandora_server/lib/PandoraFMS/Config.pm b/pandora_server/lib/PandoraFMS/Config.pm
index 0a48522d5f..05ab3c00e6 100644
--- a/pandora_server/lib/PandoraFMS/Config.pm
+++ b/pandora_server/lib/PandoraFMS/Config.pm
@@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.729";
-my $pandora_build = "181114";
+my $pandora_build = "181115";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash
diff --git a/pandora_server/lib/PandoraFMS/PluginTools.pm b/pandora_server/lib/PandoraFMS/PluginTools.pm
index 071dc0a151..01139c1941 100644
--- a/pandora_server/lib/PandoraFMS/PluginTools.pm
+++ b/pandora_server/lib/PandoraFMS/PluginTools.pm
@@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.729";
-my $pandora_build = "181114";
+my $pandora_build = "181115";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );
diff --git a/pandora_server/pandora_server.redhat.spec b/pandora_server/pandora_server.redhat.spec
index 101dd25255..719b6ce3ab 100644
--- a/pandora_server/pandora_server.redhat.spec
+++ b/pandora_server/pandora_server.redhat.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.729
-%define release 181114
+%define release 181115
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server.spec b/pandora_server/pandora_server.spec
index 78ebe3251e..79d87ed536 100644
--- a/pandora_server/pandora_server.spec
+++ b/pandora_server/pandora_server.spec
@@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.729
-%define release 181114
+%define release 181115
Summary: Pandora FMS Server
Name: %{name}
diff --git a/pandora_server/pandora_server_installer b/pandora_server/pandora_server_installer
index ea825407fa..f6821b22c1 100755
--- a/pandora_server/pandora_server_installer
+++ b/pandora_server/pandora_server_installer
@@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.729"
-PI_BUILD="181114"
+PI_BUILD="181115"
MODE=$1
if [ $# -gt 1 ]; then
diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl
index 330cd820c7..5291bf9afc 100644
--- a/pandora_server/util/pandora_db.pl
+++ b/pandora_server/util/pandora_db.pl
@@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
-my $version = "7.0NG.729 PS181114";
+my $version = "7.0NG.729 PS181115";
# Pandora server configuration
my %conf;
diff --git a/pandora_server/util/pandora_manage.pl b/pandora_server/util/pandora_manage.pl
index 32d694cc3a..ebbd72300f 100644
--- a/pandora_server/util/pandora_manage.pl
+++ b/pandora_server/util/pandora_manage.pl
@@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
-my $version = "7.0NG.729 PS181114";
+my $version = "7.0NG.729 PS181115";
# save program name for logging
my $progname = basename($0);