[GH-ISSUE #1007] path is incorrect #652

Closed
opened 2026-03-02 16:00:33 +03:00 by kerem · 1 comment
Owner

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

Full path: /home/tonytdyu/public_html/img/GHSDCS/3mm Pump Port Set.JPG
When i click to open the file, it upens
http://www.myurl.com/GHSDCS/3mm%20Pump%20Port%20Set.JPG
which is wrong. The "img" folder is no longer take into acount.
For that same reason, i cannot do anything with the any files.

It works only when i change
$http_host = $_SERVER['HTTP_HOST'].'/img';
but if i do, i no longer able to access the php script because its in the root and not inside img folder

All i changed was: $root_path = $_SERVER['DOCUMENT_ROOT'].'/img'; so that browser is navigated into "img" folder by default.
Thats where i need to force user to start with and never be able to go up higher in the tree

What am i doing wrong ?

Originally created by @tonycstech on GitHub (Apr 3, 2023). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/1007 Full path: /home/tonytdyu/public_html/img/GHSDCS/3mm Pump Port Set.JPG When i click to open the file, it upens http://www.myurl.com/GHSDCS/3mm%20Pump%20Port%20Set.JPG which is wrong. The "img" folder is no longer take into acount. For that same reason, i cannot do anything with the any files. It works only when i change $http_host = $_SERVER['HTTP_HOST'].'/img'; but if i do, i no longer able to access the php script because its in the root and not inside img folder All i changed was: $root_path = $_SERVER['DOCUMENT_ROOT'].'/img'; so that browser is navigated into "img" folder by default. Thats where i need to force user to start with and never be able to go up higher in the tree What am i doing wrong ?
kerem closed this issue 2026-03-02 16:00:34 +03:00
Author
Owner

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

fixed by changing
$root_url = '/img';

<!-- gh-comment-id:1493837192 --> @tonycstech commented on GitHub (Apr 3, 2023): fixed by changing $root_url = '/img';
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#652
No description provided.