[GH-ISSUE #1275] Saving the config causes the loss of settings #819

Closed
opened 2026-03-02 16:01:37 +03:00 by kerem · 2 comments
Owner

Originally created by @outdoorbits on GitHub (Jan 22, 2025).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1275

In my project little-backup-box tinyfilemanager does a great job, thank you for that!
But I have a problem: After saving new settings like show hidden files, my config.php changes from

<?php $use_auth = false; $root_path = "/var/www/tinyfilemanager/media"; $root_url = "files/media"; $max_upload_size_bytes = 1048576000; ?>

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; ?>

This means the lost of $use_auth and $root_path. Is there a way to prevent that?
I would expect the setup to hold any other settings. Is there an error in my config file?

Originally created by @outdoorbits on GitHub (Jan 22, 2025). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1275 In my project little-backup-box tinyfilemanager does a great job, thank you for that! But I have a problem: After saving new settings like show hidden files, my config.php changes from ` <?php $use_auth = false; $root_path = "/var/www/tinyfilemanager/media"; $root_url = "files/media"; $max_upload_size_bytes = 1048576000; ?> ` 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; ?> ` This means the lost of $use_auth and $root_path. Is there a way to prevent that? I would expect the setup to hold any other settings. Is there an error in my config file?
kerem closed this issue 2026-03-02 16:01:37 +03:00
Author
Owner

@prasathmani commented on GitHub (Jan 23, 2025):

don't change the first two lines, it will be overwritten when you save the setting, you can include your configuration after the first two lines.

<!-- gh-comment-id:2608670456 --> @prasathmani commented on GitHub (Jan 23, 2025): don't change the first two lines, it will be overwritten when you save the setting, you can include your configuration after the first two lines.
Author
Owner

@outdoorbits commented on GitHub (Jan 23, 2025):

Thank you, it works!!!

<!-- gh-comment-id:2609032519 --> @outdoorbits commented on GitHub (Jan 23, 2025): Thank you, it works!!!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tinyfilemanager#819
No description provided.