- set correct version for svn1
- correct default-php.ini for open_basedir - fix upgrading from SysCP (getPhpConfigs() fails cause the table is being added after it's being used in the update-process)
This commit is contained in:
@@ -39,7 +39,7 @@ CREATE TABLE `ftp_users` (
|
||||
`shell` varchar(255) NOT NULL default '/bin/false',
|
||||
`login_enabled` enum('N','Y') NOT NULL default 'N',
|
||||
`login_count` int(15) NOT NULL default '0',
|
||||
`last_login` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
w `last_login` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`up_count` int(15) NOT NULL default '0',
|
||||
`up_bytes` bigint(30) NOT NULL default '0',
|
||||
`down_count` int(15) NOT NULL default '0',
|
||||
@@ -462,7 +462,7 @@ INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) V
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (18, 'system', 'vmail_homedir', '/var/customers/mail/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (19, 'system', 'bindconf_directory', '/etc/bind/');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (20, 'system', 'bindreload_command', '/etc/init.d/bind9 reload');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.17');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '0.9.18-svn1');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', 'SERVERNAME');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');
|
||||
INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');
|
||||
|
||||
@@ -1422,7 +1422,7 @@ if(isFroxlorVersion('0.9.17-svn2'))
|
||||
|
||||
if(isFroxlorVersion('0.9.17'))
|
||||
{
|
||||
showUpdateStep("Updating from 0.9.17 to 0.9.18-svn1");
|
||||
showUpdateStep("Updating from 0.9.17 to 0.9.18-svn1", false);
|
||||
|
||||
showUpdateStep("Checking whether you are missing any settings", false);
|
||||
$nonefound = true;
|
||||
@@ -1442,4 +1442,4 @@ if(isFroxlorVersion('0.9.17'))
|
||||
}
|
||||
|
||||
updateToVersion('0.9.18-svn1');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -803,7 +803,7 @@ else
|
||||
`description` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` (`id`, `phpsettings`, `description`) VALUES(1, 'short_open_tag = On\r\nasp_tags = Off\r\nprecision = 14\r\noutput_buffering = 4096\r\nallow_call_time_pass_reference = Off\r\nsafe_mode = {SAFE_MODE}\r\nsafe_mode_gid = Off\r\nsafe_mode_include_dir = \"{PEAR_DIR}\"\r\nsafe_mode_allowed_env_vars = PHP_\r\nsafe_mode_protected_env_vars = LD_LIBRARY_PATH\r\nopen_basedir = \"{OPEN_BASEDIR}\"\r\ndisable_functions = exec,passthru,shell_exec,system,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate\r\ndisable_classes =\r\nexpose_php = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\npost_max_size = 16M\r\nerror_reporting = E_ALL & ~E_NOTICE\r\ndisplay_errors = On\r\ndisplay_startup_errors = Off\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\nreport_memleaks = On\r\ntrack_errors = Off\r\nhtml_errors = Off\r\nvariables_order = \"GPCS\"\r\nregister_globals = Off\r\nregister_argc_argv = Off\r\ngpc_order = \"GPC\"\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\ninclude_path = \".:{PEAR_DIR}\"\r\nenable_dl = Off\r\nfile_uploads = On\r\nupload_tmp_dir = \"{TMP_DIR}\"\r\nupload_max_filesize = 32M\r\nallow_url_fopen = Off\r\nsendmail_path = \"/usr/sbin/sendmail -t -f {CUSTOMER_EMAIL}\"\r\nsession.save_handler = files\r\nsession.save_path = \"{TMP_DIR}\"\r\nsession.use_cookies = 1\r\nsession.name = PHPSESSID\r\nsession.auto_start = 0\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.cookie_domain =\r\nsession.serialize_handler = php\r\nsession.gc_probability = 1\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.referer_check =\r\nsession.entropy_length = 16\r\nsession.entropy_file = /dev/urandom\r\nsession.cache_limiter = nocache\r\nsession.cache_expire = 180\r\nsession.use_trans_sid = 0\r\nsuhosin.simulation = Off\r\nsuhosin.mail.protect = 1\r\n', 'Default Config')");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` (`id`, `phpsettings`, `description`) VALUES(1, 'short_open_tag = On\r\nasp_tags = Off\r\nprecision = 14\r\noutput_buffering = 4096\r\nallow_call_time_pass_reference = Off\r\nsafe_mode = {SAFE_MODE}\r\nsafe_mode_gid = Off\r\nsafe_mode_include_dir = \"{PEAR_DIR}\"\r\nsafe_mode_allowed_env_vars = PHP_\r\nsafe_mode_protected_env_vars = LD_LIBRARY_PATH\r\n{OPEN_BASEDIR_C}open_basedir = \"{OPEN_BASEDIR}\"\r\ndisable_functions = exec,passthru,shell_exec,system,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate\r\ndisable_classes =\r\nexpose_php = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\npost_max_size = 16M\r\nerror_reporting = E_ALL & ~E_NOTICE\r\ndisplay_errors = On\r\ndisplay_startup_errors = Off\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\nreport_memleaks = On\r\ntrack_errors = Off\r\nhtml_errors = Off\r\nvariables_order = \"GPCS\"\r\nregister_globals = Off\r\nregister_argc_argv = Off\r\ngpc_order = \"GPC\"\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\ninclude_path = \".:{PEAR_DIR}\"\r\nenable_dl = Off\r\nfile_uploads = On\r\nupload_tmp_dir = \"{TMP_DIR}\"\r\nupload_max_filesize = 32M\r\nallow_url_fopen = Off\r\nsendmail_path = \"/usr/sbin/sendmail -t -f {CUSTOMER_EMAIL}\"\r\nsession.save_handler = files\r\nsession.save_path = \"{TMP_DIR}\"\r\nsession.use_cookies = 1\r\nsession.name = PHPSESSID\r\nsession.auto_start = 0\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.cookie_domain =\r\nsession.serialize_handler = php\r\nsession.gc_probability = 1\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.referer_check =\r\nsession.entropy_length = 16\r\nsession.entropy_file = /dev/urandom\r\nsession.cache_limiter = nocache\r\nsession.cache_expire = 180\r\nsession.use_trans_sid = 0\r\nsuhosin.simulation = Off\r\nsuhosin.mail.protect = 1\r\n', 'Default Config')");
|
||||
$db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `phpsettingid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1'");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_wrapper', '0')");
|
||||
$db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_starter', '0')");
|
||||
@@ -1081,4 +1081,4 @@ else
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -181,23 +181,37 @@ class db
|
||||
* @return string RessourceId
|
||||
*/
|
||||
|
||||
function query($query_str, $unbuffered = false)
|
||||
function query($query_str, $unbuffered = false, $suppress_error = false)
|
||||
{
|
||||
global $numbqueries;
|
||||
|
||||
if(!$unbuffered)
|
||||
{
|
||||
$this->query_id = mysql_query($query_str, $this->link_id);
|
||||
if($suppress_error)
|
||||
{
|
||||
$this->query_id = @mysql_query($query_str, $this->link_id);
|
||||
} else {
|
||||
$this->query_id = mysql_query($query_str, $this->link_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->query_id = mysql_unbuffered_query($query_str, $this->link_id);
|
||||
if($suppress_error)
|
||||
{
|
||||
$this->query_id = @mysql_unbuffered_query($query_str, $this->link_id);
|
||||
} else {
|
||||
$this->query_id = mysql_unbuffered_query($query_str, $this->link_id);
|
||||
}
|
||||
}
|
||||
|
||||
if(!$this->query_id)
|
||||
if(!$this->query_id && !$suppress_error)
|
||||
{
|
||||
$this->showerror('Invalid SQL: ' . $query_str);
|
||||
}
|
||||
elseif(!$this->query_id && $suppress_error)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$numbqueries++;
|
||||
|
||||
|
||||
@@ -25,17 +25,24 @@ function getPhpConfigs()
|
||||
global $db;
|
||||
|
||||
$query = 'SELECT * FROM `' . TABLE_PANEL_PHPCONFIGS . '` ';
|
||||
$result = $db->query($query);
|
||||
$result = $db->query($query, false, true);
|
||||
$configs_array = array();
|
||||
|
||||
while($row = $db->fetch_array($result))
|
||||
// if the table does not yet exist, we just use the default php.ini
|
||||
if(!$result)
|
||||
{
|
||||
if(!isset($configs_array[$row['id']])
|
||||
&& !in_array($row['id'], $configs_array))
|
||||
$configs_array[1] = 'Default php.ini';
|
||||
}
|
||||
else
|
||||
{
|
||||
while($row = $db->fetch_array($result))
|
||||
{
|
||||
$configs_array[$row['id']] = html_entity_decode($row['description']);
|
||||
if(!isset($configs_array[$row['id']])
|
||||
&& !in_array($row['id'], $configs_array))
|
||||
{
|
||||
$configs_array[$row['id']] = html_entity_decode($row['description']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $configs_array;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ define('PACKAGE_ENABLED', 2);
|
||||
|
||||
// VERSION INFO
|
||||
|
||||
$version = '0.9.17';
|
||||
$version = '0.9.18-svn1';
|
||||
$dbversion = '2';
|
||||
$branding = '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user