[GH-ISSUE #1008] Navigating to wrong page after login #651

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

Originally created by @tonycstech on GitHub (Apr 3, 2023).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1008

Here are my settings

// Root path for file manager
// use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder'
$root_path = $_SERVER['DOCUMENT_ROOT'].'/img';

// Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder'
// Will not working if $root_path will be outside of server document root
$root_url = '/img';

// Server hostname. Can set manually if wrong
// $_SERVER['HTTP_HOST'].'/folder'
$http_host = $_SERVER['HTTP_HOST'];

Once logged in, page "www.mywebsite.com/img" opens and error 403

php file is in the website root.
all files are inside img folder so i need to be able to use this browser to browse img folder.

Originally created by @tonycstech on GitHub (Apr 3, 2023). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1008 Here are my settings ``` // Root path for file manager // use absolute path of directory i.e: '/var/www/folder' or $_SERVER['DOCUMENT_ROOT'].'/folder' $root_path = $_SERVER['DOCUMENT_ROOT'].'/img'; // Root url for links in file manager.Relative to $http_host. Variants: '', 'path/to/subfolder' // Will not working if $root_path will be outside of server document root $root_url = '/img'; // Server hostname. Can set manually if wrong // $_SERVER['HTTP_HOST'].'/folder' $http_host = $_SERVER['HTTP_HOST']; ``` Once logged in, page "www.mywebsite.com/img" opens and error 403 php file is in the website root. all files are inside img folder so i need to be able to use this browser to browse img folder.
kerem closed this issue 2026-03-02 16:00:33 +03:00
Author
Owner

@tonycstech commented on GitHub (Apr 3, 2023):

To solve this issue, i had to make the following change:
fm_redirect('browser_new.php?p=');
otherwise after login, it opens www.mywebsite.com/img instead of opening file browser after successful login.

<!-- gh-comment-id:1494839847 --> @tonycstech commented on GitHub (Apr 3, 2023): To solve this issue, i had to make the following change: fm_redirect('browser_new.php?p='); otherwise after login, it opens www.mywebsite.com/img instead of opening file browser after successful login.
Author
Owner

@ner00 commented on GitHub (Apr 10, 2023):

Change this line
github.com/prasathmani/tinyfilemanager@6a6eb8abec/tinyfilemanager.php (L325)
to:

fm_redirect(FM_SELF_URL);
<!-- gh-comment-id:1502135553 --> @ner00 commented on GitHub (Apr 10, 2023): Change this line https://github.com/prasathmani/tinyfilemanager/blob/6a6eb8abecef523aafda0e9aa71f94f231128222/tinyfilemanager.php#L325 to: ```php fm_redirect(FM_SELF_URL); ```
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#651
No description provided.