[GH-ISSUE #907] Download and Direct link problems when using with a subfolder... #598

Closed
opened 2026-03-02 16:00:08 +03:00 by kerem · 4 comments
Owner

Originally created by @carlpeer on GitHub (Dec 2, 2022).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/907

Case 1:

$root_path = $_SERVER['DOCUMENT_ROOT'].'/subfolder';
$root_url = '';

When using this: download works, but direct link doesn't work.

Case 2:

$root_path = $_SERVER['DOCUMENT_ROOT'].'/subfolder';
$root_url = '/subfolder';

When using this: download works, and direct link works, but when you login with this config you will receive a page not found, because the path to the script becomes: http://url/subfolder/subfolder/index.php
So, the subfolder is a second time in the path.

Problem 2:

Download doesn't work when you click on a filename, and use 'download' on that screen... No download starts and the script returns to the main view with all the files.

Originally created by @carlpeer on GitHub (Dec 2, 2022). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/907 **Case 1:** $root_path = $_SERVER['DOCUMENT_ROOT'].'/subfolder'; $root_url = ''; When using this: **download works**, but **direct link doesn't work**. **Case 2:** $root_path = $_SERVER['DOCUMENT_ROOT'].'/subfolder'; $root_url = '/subfolder'; When using this: **download works**, and **direct link works**, but when you login with this config you will receive a page not found, because the path to the script becomes: **http://url/subfolder/subfolder/index.php** So, the subfolder is a second time in the path. **Problem 2:** Download doesn't work when you click on a filename, and use 'download' on that screen... No download starts and the script returns to the main view with all the files.
kerem closed this issue 2026-03-02 16:00:08 +03:00
Author
Owner

@prasathmani commented on GitHub (Dec 2, 2022):

@carlpeer thanks for reporting the issue. try following config,

$root_path = $_SERVER['DOCUMENT_ROOT'].'/subfolder';
$root_url = 'subfolder';

please share some screenshots, it will be helpful to fix.

<!-- gh-comment-id:1334916832 --> @prasathmani commented on GitHub (Dec 2, 2022): @carlpeer thanks for reporting the issue. try following config, ```php $root_path = $_SERVER['DOCUMENT_ROOT'].'/subfolder'; $root_url = 'subfolder'; ``` please share some screenshots, it will be helpful to fix.
Author
Owner

@carlpeer commented on GitHub (Dec 2, 2022):

@prasathmani Thank you for your support!

You will see the page not found error

See the screenshot below for the download button that doesn't work...

download

<!-- gh-comment-id:1334977400 --> @carlpeer commented on GitHub (Dec 2, 2022): @prasathmani Thank you for your support! You will see the **page not found error** See the screenshot below for the download button that doesn't work... ![download](https://user-images.githubusercontent.com/93937583/205260097-b8eb89ac-5575-4886-a7d6-a3f39e5cee98.jpeg)
Author
Owner

@prasathmani commented on GitHub (Dec 2, 2022):

@carlpeer , thanks for sharing, Let me check.

<!-- gh-comment-id:1335042569 --> @prasathmani commented on GitHub (Dec 2, 2022): @carlpeer , thanks for sharing, Let me check.
Author
Owner

@prasathmani commented on GitHub (Dec 3, 2022):

@carlpeer, download issues is fixed now. try with latest version.

<!-- gh-comment-id:1336093504 --> @prasathmani commented on GitHub (Dec 3, 2022): @carlpeer, download issues is fixed now. try with latest version.
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#598
No description provided.