tinyfilemanager icon indicating copy to clipboard operation
tinyfilemanager copied to clipboard

Lost settings after saving settings

Open outdoorbits opened this issue 1 year ago • 1 comments

At first: Thank you very much, tinyfilemanager does a fantastic job and I'm using it since a long time in https://github.com/outdoorbits/little-backup-box. Now I just noticed, that setting from config.php get lost when saving settings in the UI. For example, after changing and saving "Show Hidden Files", other settings are gone: <?php $use_auth = false; $root_path = "/var/www/tinyfilemanager/media"; $root_url = "files/media"; $max_upload_size_bytes = 1048576000; ?> moves to <?php //Default Configuration $CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":true,"hide_Cols":false,"theme":"light"}'; $root_url = "files\/media"; $max_upload_size_bytes = 1048576000; ?> Now I need to log in and my root dir is not set correctly anymore. Can you help me, how to prevent this? In config-sample.txt I can't find anything about the usage of $CONFIG but putting my settings here does not solve the problem.

outdoorbits avatar Oct 20 '24 16:10 outdoorbits

If I recall correctly, the second and third rows will be used to write the configuration. To prevent overwriting any existing code, add two dummy rows below <?php. For example, in config.php, the first lines could look like this:

<?php
// ******************
// TFM Config will be stored here. 

smalos avatar Mar 17 '25 13:03 smalos