X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/45d4d5858d47fd71a65bf642c0eddd31ddf9a83f..bbf886e62dc4746fdbae813cfb80536228f77626:/dbinstall.php diff --git a/dbinstall.php b/dbinstall.php index 64e4cac0..407a290f 100644 --- a/dbinstall.php +++ b/dbinstall.php @@ -50,6 +50,16 @@ function ttExecute($sql) { if ($request->isGet()) { echo('

Environment Checks

'); + // Determine if cookies are enabled in browser. + // session_start(); // already called in initialize.php. + $session_id1 = session_id(); + session_destroy(); + session_start(); + $session_id2 = session_id(); + if ($session_id1 != $session_id2) { + echo('Error: browser cookies are off.
'); + } + // Check if WEB-INF/templates_c dir is writable. if (is_writable(APP_DIR.'/WEB-INF/templates_c/')) { echo('WEB-INF/templates_c/ directory is writable.
'); @@ -92,11 +102,6 @@ if ($request->isGet()) { echo('Error: PHP version is not high enough: '.phpversion().'. Required: '.$required_version.'.
'); } - // Check if PHP session path is writeable. - if (!is_writable(session_save_path())) { - echo('Error: PHP session path '.session_save_path().' is not writable.
'); - } - // Depending on DSN, require either mysqli or mysql extensions. if (strrpos(DSN, 'mysqli://', -strlen(DSN)) !== FALSE) { if (extension_loaded('mysqli')) { @@ -1061,6 +1066,7 @@ if ($_POST) { ttExecute("create index timesheet_idx on tt_log(timesheet_id)"); ttExecute("ALTER TABLE `tt_expense_items` ADD `timesheet_id` int(11) default NULL AFTER `project_id`"); ttExecute("create index timesheet_idx on tt_expense_items(timesheet_id)"); + ttExecute("UPDATE `tt_site_config` SET param_value = '1.18.37', modified = now() where param_name = 'version_db' and param_value = '1.18.36'"); } if ($_POST["cleanup"]) { @@ -1079,6 +1085,7 @@ if ($_POST) { ttExecute("OPTIMIZE TABLE tt_clients"); ttExecute("OPTIMIZE TABLE tt_config"); ttExecute("OPTIMIZE TABLE tt_cron"); + ttExecute("OPTIMIZE TABLE tt_timesheets"); ttExecute("OPTIMIZE TABLE tt_custom_field_log"); ttExecute("OPTIMIZE TABLE tt_custom_field_options"); ttExecute("OPTIMIZE TABLE tt_custom_fields");