diff --git a/example/includes/config.yml b/example/includes/config.yml index cdae6d6..5cb6a53 100644 --- a/example/includes/config.yml +++ b/example/includes/config.yml @@ -10,10 +10,6 @@ tmp_root_directory: "${data_directory}/tmp" # Temporary uploading files directory (optional, default: PHP ini default) upload_tmp_directory: ${tmp_root_directory}/uploading" -# Uploading file size limit (in bytes, example: 104857600 == 100Mb) -# (optional, default: PHP ini default) -upload_max_filesize: 104857600 - # Main pagetitle main_pagetitle: "Eesyphp" diff --git a/example/includes/core.php b/example/includes/core.php index aaaf6ed..05b345d 100644 --- a/example/includes/core.php +++ b/example/includes/core.php @@ -46,9 +46,6 @@ App::init( "static/lib" ), ), - 'default' => array( - 'upload_max_filesize' => 10485760, - ), ), $root_dir_path ); diff --git a/skel/config.yml b/skel/config.yml index 8a5d306..d29772a 100644 --- a/skel/config.yml +++ b/skel/config.yml @@ -10,10 +10,6 @@ tmp_root_directory: "${data_directory}/tmp" # Temporary uploading files directory (optional, default: PHP ini default) upload_tmp_directory: ${tmp_root_directory}/uploading" -# Uploading file size limit (in bytes, example: 104857600 == 100Mb) -# (optional, default: PHP ini default) -upload_max_filesize: 104857600 - # Main pagetitle main_pagetitle: "Eesyphp" diff --git a/src/App.php b/src/App.php index fd23105..61ede68 100644 --- a/src/App.php +++ b/src/App.php @@ -45,7 +45,6 @@ class App { array( 'overwrite_config_files' => array(), 'upload_tmp_directory' => null, - 'upload_max_filesize' => null, 'sentry.enabled' => true, 'log.enabled' => true, 'session.enabled' => true, @@ -92,16 +91,6 @@ class App { if (self :: get('db.enabled', null, 'bool')) Db::init(); - // Define common upload_tmp_dir & upload_max_filesize PHP ini - if (self::isset('upload_tmp_directory')) - Config :: ini_set('upload_tmp_dir', self::get('upload_tmp_directory', null, 'string')); - if (self::isset('upload_max_filesize')) { - Config :: ini_set('upload_max_filesize', self::get('upload_max_filesize', null, 'string')); - // post_max_size must be larger than upload_max_filesize - // See: https://www.php.net/manual/en/ini.core.php#ini.post-max-size - Config :: ini_set('post_max_size', strval(self::get('upload_max_filesize', null, 'int') * 1.1)); - } - $sentry_span->finish(); } diff --git a/src/Tpl.php b/src/Tpl.php index e832b7d..6b49137 100644 --- a/src/Tpl.php +++ b/src/Tpl.php @@ -108,7 +108,6 @@ class Tpl { 'included_css_files' => ["css/app.css"], 'included_js_files' => ["js/app.js"], 'webstats_js_code' => null, - 'upload_max_filesize' => null, 'debug_ajax' => App::get('debug_ajax', false, 'bool'), 'logo_url' => 'images/logo.svg', 'favicon_url' => 'images/favicon.png', @@ -548,12 +547,6 @@ class Tpl { 'webstats_js_code', App::get('webstats_js_code', null, 'string')); - // Upload max size - if (App::get('upload_max_filesize', null, 'int')) - Tpl :: assign( - 'upload_max_filesize', - App::get('upload_max_filesize', null, 'int')); - $init_time = App::get('init_time'); Tpl :: assign('compute_time', $init_time?format_duration(hrtime(true)-$init_time, 'ns', 'ms'):null); Tpl :: assign('db_time', Db :: $total_query_time?format_duration(Db :: $total_query_time, 'ns', 'ms'):null);