From 515de029315aadd39fc83456c55f0044b0761a10 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Mon, 30 Apr 2018 12:14:00 +0200 Subject: [PATCH] - Removed SQL mode check from installer. The check is not needed anymore. - Fixed #5027 add support for PHP 7.1 and 7.2 on nginx servers in apps vhost. - suppress some warnings in simplepie.inc.php --- install/lib/installer_base.lib.php | 11 ++++++++--- interface/lib/classes/simplepie.inc.php | 2 +- server/plugins-available/apps_vhost_plugin.inc.php | 7 ++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 421afa3fc7..f6bdcd514f 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -225,14 +225,14 @@ class installer_base { global $conf; //* check sql-mode - $check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode"); + /*$check_sql_mode = $this->db->queryOneRecord("SELECT @@sql_mode"); if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') { echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n"; echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n"; echo"to the mysqld-section in your mysql-config on this server and restart mysqld afterwards\n"; die(); - } + }*/ $unwanted_sql_plugins = array('validate_password'); $sql_plugins = $this->db->queryAllRecords("SELECT plugin_name FROM information_schema.plugins WHERE plugin_status='ACTIVE' AND plugin_name IN ?", $unwanted_sql_plugins); @@ -2093,7 +2093,12 @@ class installer_base { $content = str_replace('{fpm_socket}', $fpm_socket, $content); $content = str_replace('{cgi_socket}', $cgi_socket, $content); - if(file_exists('/var/run/php5-fpm.sock') || file_exists('/var/run/php/php7.0-fpm.sock')){ + if( file_exists('/var/run/php5-fpm.sock') + || file_exists('/var/run/php/php7.0-fpm.sock') + || file_exists('/var/run/php/php7.1-fpm.sock') + || file_exists('/var/run/php/php7.2-fpm.sock') + || file_exists('/var/run/php/php7.3-fpm.sock') + ){ $use_tcp = '#'; $use_socket = ''; } else { diff --git a/interface/lib/classes/simplepie.inc.php b/interface/lib/classes/simplepie.inc.php index 5d36c09d34..626e801e42 100644 --- a/interface/lib/classes/simplepie.inc.php +++ b/interface/lib/classes/simplepie.inc.php @@ -13338,7 +13338,7 @@ class SimplePie_Parse_Date } // Convert the number of seconds to an integer, taking decimals into account - $second = round($match[6] + $match[7] / pow(10, strlen($match[7]))); + $second = @round($match[6] + $match[7] / @pow(10, strlen($match[7]))); return gmmktime($match[4], $match[5], $second, $match[2], $match[3], $match[1]) - $timezone; } diff --git a/server/plugins-available/apps_vhost_plugin.inc.php b/server/plugins-available/apps_vhost_plugin.inc.php index cf01df692d..88b5aa290c 100644 --- a/server/plugins-available/apps_vhost_plugin.inc.php +++ b/server/plugins-available/apps_vhost_plugin.inc.php @@ -169,7 +169,12 @@ class apps_vhost_plugin { //$content = str_replace('{fpm_port}', $web_config['php_fpm_start_port']+1, $content); $content = str_replace('{fpm_socket}', $fpm_socket, $content); $content = str_replace('{cgi_socket}', $cgi_socket, $content); - if(file_exists('/var/run/php5-fpm.sock') || file_exists('/var/run/php/php7.0-fpm.sock')){ + if( file_exists('/var/run/php5-fpm.sock') + || file_exists('/var/run/php/php7.0-fpm.sock') + || file_exists('/var/run/php/php7.1-fpm.sock') + || file_exists('/var/run/php/php7.2-fpm.sock') + || file_exists('/var/run/php/php7.3-fpm.sock') + ){ $use_tcp = '#'; $use_socket = ''; } else { -- GitLab