[GH-ISSUE #273] application file disappear from server after a couple of minutes #199

Open
opened 2026-03-02 15:56:42 +03:00 by kerem · 31 comments
Owner

Originally created by @dagon84 on GitHub (Dec 31, 2019).
Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/273

Issue:

  • I upload the file Tinyfilmanager.php via FTP in a subfolder, file permission 644, folder permission 755
  • I can browse for a couple of minutes in the interface
  • After a while I get error 404
  • I'm going to check the folder where i uploaded the file, and the file Tinyfilmanager.php is missing, as never uploaded.

is the only file that diasappear, i don't understand why.

Error log report the following

Use of undefined constant FM_EXCLUDE_ITEMS - assumed 'FM_EXCLUDE_ITEMS' in /home/clsprplv/public_html/ipcam/tinyfilemanager.php on line 2248
[31-Dec-2019 20:03:54 Etc/UTC] PHP Warning: in_array() expects parameter 2 to be array, string given in /path/tinyfilemanager.php on line 2248

But I can't understand how to solve the error.

Am I missing some setting?
Any help would be appreciated.

I have tried to copy the code ina previous php file, that disappear after a while

Originally created by @dagon84 on GitHub (Dec 31, 2019). Original GitHub issue: https://github.com/prasathmani/tinyfilemanager/issues/273 Issue: - I upload the file Tinyfilmanager.php via FTP in a subfolder, file permission 644, folder permission 755 - I can browse for a couple of minutes in the interface - After a while I get error 404 - I'm going to check the folder where i uploaded the file, and the file Tinyfilmanager.php is missing, as never uploaded. is the only file that diasappear, i don't understand why. Error log report the following > Use of undefined constant FM_EXCLUDE_ITEMS - assumed 'FM_EXCLUDE_ITEMS' in /home/clsprplv/public_html/ipcam/tinyfilemanager.php on line 2248 > [31-Dec-2019 20:03:54 Etc/UTC] PHP Warning: in_array() expects parameter 2 to be array, string given in /path/tinyfilemanager.php on line 2248 But I can't understand how to solve the error. Am I missing some setting? Any help would be appreciated. I have tried to copy the code ina previous php file, that disappear after a while
Author
Owner

@decioviegas commented on GitHub (Jan 3, 2020):

Hello
I have the same problem. A Tinyfilmanager.php file contents disappear from server.
(the file Tinyfilmanager.php is empty after the first call)

<!-- gh-comment-id:570540472 --> @decioviegas commented on GitHub (Jan 3, 2020): Hello I have the same problem. A Tinyfilmanager.php file contents disappear from server. (the file Tinyfilmanager.php is empty after the first call)
Author
Owner

@prasathmani commented on GitHub (Jan 3, 2020):

@decioviegas and @dagon84 ,
could you please check error logs and security logs, if you found something related to tinyfilemanager, plz share the logs, really it helps to find the root cause.

<!-- gh-comment-id:570545505 --> @prasathmani commented on GitHub (Jan 3, 2020): @decioviegas and @dagon84 , could you please check error logs and security logs, if you found something related to tinyfilemanager, plz share the logs, really it helps to find the root cause.
Author
Owner

@decioviegas commented on GitHub (Jan 3, 2020):

I have not error log.
Just open the login page and the file (Tinyfilmanager.php) will be empty
print

<!-- gh-comment-id:570550744 --> @decioviegas commented on GitHub (Jan 3, 2020): I have not error log. Just open the login page and the file (Tinyfilmanager.php) will be empty ![print](https://user-images.githubusercontent.com/59318411/71721824-83999b00-2e1e-11ea-8746-ba7228d7bb19.PNG)
Author
Owner

@decioviegas commented on GitHub (Jan 3, 2020):

The Immunify360 has detected "Original (infected) file will be removed"
Reason: SMW-SA-05072-mlw-4
Status: Content removed.

<!-- gh-comment-id:570577644 --> @decioviegas commented on GitHub (Jan 3, 2020): The Immunify360 has detected "Original (infected) file will be removed" Reason: SMW-SA-05072-mlw-4 Status: Content removed.
Author
Owner

@k4mrul commented on GitHub (Nov 25, 2020):

I am having the same issue. After log in, the contents of tinyfilemanager.php disappeared. Anyone know any workaround?

It's because of Immunify360.
Reason: SMW-SA-05072-php.tool.filemanager-6

Temporary fixed by adding tinyfilemanager.php as an exclusion in immunify360

<!-- gh-comment-id:733476717 --> @k4mrul commented on GitHub (Nov 25, 2020): I am having the same issue. After log in, the contents of tinyfilemanager.php disappeared. Anyone know any workaround? It's because of Immunify360. Reason: SMW-SA-05072-php.tool.filemanager-6 Temporary fixed by adding tinyfilemanager.php as an exclusion in immunify360
Author
Owner

@skerbis commented on GitHub (Nov 30, 2020):

in https://github.com/prasathmani/tinyfilemanager/issues/461 you can see more details.

<!-- gh-comment-id:735692646 --> @skerbis commented on GitHub (Nov 30, 2020): in https://github.com/prasathmani/tinyfilemanager/issues/461 you can see more details.
Author
Owner

@alisson-juns commented on GitHub (Jan 23, 2021):

I have the same problem.
Did anyone get any solution?
My server deletes the file and there is no log on it.

<!-- gh-comment-id:766200336 --> @alisson-juns commented on GitHub (Jan 23, 2021): I have the same problem. Did anyone get any solution? My server deletes the file and there is no log on it.
Author
Owner

@asrafulattare commented on GitHub (Feb 3, 2021):

@prasathmani anyone solved this issue?

<!-- gh-comment-id:772453409 --> @asrafulattare commented on GitHub (Feb 3, 2021): @prasathmani anyone solved this issue?
Author
Owner

@skerbis commented on GitHub (Feb 3, 2021):

@attare026 whitelist the script in your ImunifyAV

<!-- gh-comment-id:772476604 --> @skerbis commented on GitHub (Feb 3, 2021): @attare026 whitelist the script in your ImunifyAV
Author
Owner

@alisson-juns commented on GitHub (Feb 6, 2021):

I had to contact the technical support of my hosting to create an exception on the server so that the file was not deleted.

<!-- gh-comment-id:774489744 --> @alisson-juns commented on GitHub (Feb 6, 2021): I had to contact the technical support of my hosting to create an exception on the server so that the file was not deleted.
Author
Owner

@asrafulattare commented on GitHub (Feb 6, 2021):

whitelist the script in your ImunifyAV

can explain it how can I do?
thanks

<!-- gh-comment-id:774503261 --> @asrafulattare commented on GitHub (Feb 6, 2021): > whitelist the script in your ImunifyAV can explain it how can I do? thanks
Author
Owner

@ueen commented on GitHub (Feb 19, 2021):

same, the provider locked the entire site, maybe you should mention that in the README, its kind of a big deal!!

<!-- gh-comment-id:782304916 --> @ueen commented on GitHub (Feb 19, 2021): same, the provider locked the entire site, maybe you should mention that in the README, its kind of a big deal!!
Author
Owner

@prasathmani commented on GitHub (Feb 24, 2021):

removed PHP decoded code in the new version, hope it resolves the issue

<!-- gh-comment-id:784886910 --> @prasathmani commented on GitHub (Feb 24, 2021): removed PHP decoded code in the new version, hope it resolves the issue
Author
Owner

@saeed74 commented on GitHub (Aug 21, 2021):

isuue is not resolved yet in last version:

reason of delete: SMW-SA-05072-php.tool.filemanager-7

Screenshot_583

<!-- gh-comment-id:903117826 --> @saeed74 commented on GitHub (Aug 21, 2021): isuue is not resolved yet in last version: reason of delete: SMW-SA-05072-php.tool.filemanager-7 ![Screenshot_583](https://user-images.githubusercontent.com/8604609/130323538-54aa286f-40bc-475f-8125-9651e5470fc6.png)
Author
Owner

@dampelz commented on GitHub (Sep 17, 2021):

same issue
SMW-SA-05072-php.tool.filemanager-7

<!-- gh-comment-id:921835562 --> @dampelz commented on GitHub (Sep 17, 2021): same issue SMW-SA-05072-php.tool.filemanager-7
Author
Owner

@Hieung28 commented on GitHub (Dec 7, 2021):

has anyone solved this issue?

<!-- gh-comment-id:987660539 --> @Hieung28 commented on GitHub (Dec 7, 2021): has anyone solved this issue?
Author
Owner

@saeed74 commented on GitHub (Jul 3, 2022):

this bug is still present in version tiny file manager 2.4.7

<!-- gh-comment-id:1173019860 --> @saeed74 commented on GitHub (Jul 3, 2022): this bug is still present in version tiny file manager 2.4.7
Author
Owner

@saeed74 commented on GitHub (Jul 6, 2022):

Screenshot_43

<!-- gh-comment-id:1176298010 --> @saeed74 commented on GitHub (Jul 6, 2022): ![Screenshot_43](https://user-images.githubusercontent.com/8604609/177575222-945bc550-9088-461f-9cb4-a16389d8a83b.png)
Author
Owner

@FransW5 commented on GitHub (Jul 21, 2022):

Solution for cPanel firewall:

Open tinyfilemanager.php in a text editor And

Replace All:
fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH));
With:
$FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH));

<!-- gh-comment-id:1191076676 --> @FransW5 commented on GitHub (Jul 21, 2022): Solution for cPanel firewall: Open tinyfilemanager.php in a text editor And Replace All: `fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); ` With: `$FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH));`
Author
Owner

@YsrMe commented on GitHub (Aug 31, 2022):

Hello...

the script was working fine on bluehost & hostinger hosting services, but after deploying the security feature the file was detected as malicious file & got deleted ⁉

i am very sad because this is the best file manager scripts that you can find so far... is there any progress on solving this issue ⁉

Regards,

<!-- gh-comment-id:1232671199 --> @YsrMe commented on GitHub (Aug 31, 2022): Hello... the script was working fine on bluehost & hostinger hosting services, but after deploying the security feature the file was detected as malicious file & got deleted ⁉ i am very sad because this is the best file manager scripts that you can find so far... is there any progress on solving this issue ⁉ Regards,
Author
Owner

@robsd commented on GitHub (Oct 5, 2022):

I get the same issue "SMW-SA-05072-php.tool.filemanager-2".

File contents gets wiped after upload.

I've tried @FransW5's suggestion but that didn't work for me unfortunately.

<!-- gh-comment-id:1269104583 --> @robsd commented on GitHub (Oct 5, 2022): I get the same issue "SMW-SA-05072-php.tool.filemanager-2". File contents gets wiped after upload. I've tried @FransW5's suggestion but that didn't work for me unfortunately.
Author
Owner

@FransW5 commented on GitHub (Oct 17, 2022):

@robsd

I tested on (cPanel 106.0.8 + cPGuard + imunify360 Malware scanner) and with the following replacement, solves the problem.

What hosting management system are you using?
What antivirus and firewall is running on your host?

Replace All:
fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH));

With:
$FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH));
<!-- gh-comment-id:1281277449 --> @FransW5 commented on GitHub (Oct 17, 2022): @robsd I tested on (cPanel 106.0.8 + cPGuard + imunify360 Malware scanner) and with the following replacement, solves the problem. What hosting management system are you using? What antivirus and firewall is running on your host? ``` Replace All: fm_redirect(FM_SELF_URL . '?p=' . urlencode(FM_PATH)); With: $FM_PATH=FM_PATH; fm_redirect(FM_SELF_URL . '?p=' . urlencode($FM_PATH)); ```
Author
Owner

@prasathmani commented on GitHub (Nov 19, 2022):

This issue is addressed in the new release.

<!-- gh-comment-id:1320960277 --> @prasathmani commented on GitHub (Nov 19, 2022): This issue is addressed in the new [release](https://github.com/prasathmani/tinyfilemanager/releases/tag/2.5.0).
Author
Owner

@YsrMe commented on GitHub (Nov 25, 2022):

Hello...

Still the same issue on hostinger.com it sees it as (Malicious) file!

image

<!-- gh-comment-id:1327103867 --> @YsrMe commented on GitHub (Nov 25, 2022): Hello... Still the same issue on hostinger.com it sees it as (Malicious) file! ![image](https://user-images.githubusercontent.com/48659217/203923793-e1bd7ba1-8c17-4c9c-b321-4bf529b31d8f.png)
Author
Owner

@Salkalkhan commented on GitHub (Nov 25, 2022):

yes They are deleting instantly now. This single page file manager is awesome but can't run on Hostinger. Really need to do something quickly.

<!-- gh-comment-id:1327407506 --> @Salkalkhan commented on GitHub (Nov 25, 2022): yes They are deleting instantly now. This single page file manager is awesome but can't run on Hostinger. Really need to do something quickly.
Author
Owner

@prasathmani commented on GitHub (Nov 26, 2022):

I am happy to fit it, but need more information what line or part of code is causing the problem.

<!-- gh-comment-id:1327988114 --> @prasathmani commented on GitHub (Nov 26, 2022): I am happy to fit it, but need more information what line or part of code is causing the problem.
Author
Owner

@Salkalkhan commented on GitHub (Nov 26, 2022):

I don't know which line is causing this problem as I have done many changes in Version 2.4.4 and It is working for me. Yesterday I updated the page and it disappear after few minutes. I re upload but again disappear. It was malware scanner from hostinger.com who keep deleting that file.
Gave me sometime, Tomorrow I will download previous commits and Upload it One by one.

<!-- gh-comment-id:1328008651 --> @Salkalkhan commented on GitHub (Nov 26, 2022): I don't know which line is causing this problem as I have done many changes in Version 2.4.4 and It is working for me. Yesterday I updated the page and it disappear after few minutes. I re upload but again disappear. It was malware scanner from hostinger.com who keep deleting that file. Gave me sometime, Tomorrow I will download previous commits and Upload it One by one.
Author
Owner

@Salkalkhan commented on GitHub (Nov 26, 2022):

Winter Release 22 Latest version = 2.5.0 8de16a4
deleting Line number 3085-3087 solves the deleting problem.

if(is_array($contentType)) {
        $contentType = implode(' ', $contentType);
    }

Delete this above code.

<!-- gh-comment-id:1328023811 --> @Salkalkhan commented on GitHub (Nov 26, 2022): Winter Release 22 Latest version = 2.5.0 8de16a4 deleting Line number 3085-3087 solves the deleting problem. ``` if(is_array($contentType)) { $contentType = implode(' ', $contentType); } ``` Delete this above code.
Author
Owner

@YsrMe commented on GitHub (Nov 27, 2022):

Hello @Salkalkhan

I did what you suggested & it is still the same issue as you can see below :(

image

<!-- gh-comment-id:1328199068 --> @YsrMe commented on GitHub (Nov 27, 2022): Hello @Salkalkhan I did what you suggested & it is still the same issue as you can see below :( ![image](https://user-images.githubusercontent.com/48659217/204126795-fe1ac610-c458-4667-971b-f41f8432770d.png)
Author
Owner

@Salkalkhan commented on GitHub (Nov 27, 2022):

Hi, I don't know why it didn't got deleted within an hour but when Today I logged in my server it was deleted.
I have left with only those files which were released before Feb 14 2022.
I am still working to find the exact code which is causing this issue. Problem is they are not deleting instantly. After making any changes have to wait for them to delete that file.

My suggestion will be to go to commit and download any version which was uploaded before feb 14 this year and work till any solution is released.

<!-- gh-comment-id:1328201408 --> @Salkalkhan commented on GitHub (Nov 27, 2022): Hi, I don't know why it didn't got deleted within an hour but when Today I logged in my server it was deleted. I have left with only those files which were released before Feb 14 2022. I am still working to find the exact code which is causing this issue. Problem is they are not deleting instantly. After making any changes have to wait for them to delete that file. My suggestion will be to go to commit and download any version which was uploaded before feb 14 this year and work till any solution is released.
Author
Owner

@prasathmani commented on GitHub (Jul 4, 2023):

duplicate #1067

<!-- gh-comment-id:1619473559 --> @prasathmani commented on GitHub (Jul 4, 2023): duplicate #1067
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#199
No description provided.