marekrei / encode-explorer Goto Github PK
View Code? Open in Web Editor NEWHome Page: http://encode-explorer.siineiolekala.net
Home Page: http://encode-explorer.siineiolekala.net
Possible to add rename and or move functions?
System:
I'm running Debian Jessie x64
Linux hostname 3.16.0-4-amd64 # 1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux
PHP 5.6.30-0+deb8u1
nginx/1.6.2
encode-explorer 6.4.1
What's wrong:
When trying to upload a file I get an error
Failed to upload the file!
What it should be:
file should be uploaded
The changes I added to the file are just the config options like:
$_CONFIG['require_login'] = true;
$_CONFIG['users'] = array....;
$_CONFIG['delete_enable'] = true;
$_CONFIG['upload_reject_extension'] = array("php", "php2", "php3", "php4", "php5", "phtml", "exe");
I didn't touch
$_CONFIG['upload_allow_type'] = array();
Logs:
nginx error.log gives me:
2017/03/18 21:43:39 [error] 8871#0: *29 FastCGI sent in stderr: "PHP message: PHP Warning: finfo_file(): Empty filename or path in /var/www/repo/files.php on line 2407" while reading response header from upstream, client: X.X.X.X, server: my_subdomain, request: "POST /files.php?dir=directory/directory HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "my_subdomain", referrer: "https://my_subdomain/files.php?dir=directory/directory"
The magic file is located on my system at /usr/share/file/magic.mgc
there's also a symlink to that file at /usr/share/misc/magic.mgc
Edit: it was a .zip file that failed.
Hi, this is to thank you for creating this simple file manager, I am using it for a bit different purpose. https://github.com/cyberorg/igc2kmz
Using Windows 10 with PHP 7.2 on IIS.
When I set basedir
to a specific folder (such as C:\Test), the file list is displayed but 'file access functions', such as filesize
and filemtime
, throw a stat failed
warning.
Seems like the basedir
path should be used for these: warning mentions ./filename
but I think it should be C:\Test\filename
).
1886: The time format should be "Y-m-d H:i:s"
class File
and class Dir
and constructor
function File
and function Dir
have same names with the class.
PHP gives error that keeps accumulating to mega or even gigabytes in size
Please change class names to From File to FolderFile and from Dir to Folder
and change these two lines.
From $this->dirs[] = new Dir($object, $this->location);
To $this->dirs[] = new Folder($object, $this->location);
and
From $this->files[] = new File($object, $this->location);
To $this->files[] = new FolderFile($object, $this->location);
My hosting provider forcibly moved my site to another server, and now browsing through directories in Encode Explorer is painfully slow. It takes more than 4 seconds after the intial GET request to receive anything. And it's the same with every directory, as well as loading the login screen. I'm guessing a number of things are different in the new server, including PHP version and perhaps some of the settings. I'm not really sure what changed because the old server is available no more. Other than that, no new files were uploaded or directories created. The number of files is fairly large, and they take up 32 GB. The log is file is also large, about 60 MB. Yet these things were not an issue on the old server.
All PHP settings are visible on https://pasiflora.serveriai.lt/PHP/
Any suggestions on where to start debugging? I'm not really much into PHP.
Anyone?
How to use this?
Is it currently possible to enable full folder downloads? Any way to make this one a reality?
Hi,
I'm using Windows servers, here is my server's detail:
Windows 8.1
Nginx 1.9.5
PHP 5.6.14
I found many bugs (errors) on PHP 5.6.
Example like mktime() will show error, must use time() to instead; htmlspecialchars() will return empty string on non UTF-8 servers.
It cannot work on my server, all Chinese files and folders are not showing.
Is there any idea to fix these problems?
And I want to help Encode Explorer to translate to Chinese Traditional, is there any way to help you?
Thanks.
Hello, all is in the title :)
A file name or directory name "0" (the zero char) are not displayed and break the file list
[26-Nov-2020 01:32:21 America/New_York] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Dir has a deprecated constructor in /home/username/public_html/main.php on line xxxx
Error pointing to lines containing:
class Dir
and
class File
Does anyone have an idea and can help with add search option (function)?
CSS need "word-break" or "overflow: hidden" to protect layout from any long filname without caesura.
// Simplified Chinese
$_TRANSLATIONS["zh_cn"] = array(
"file_name" => "文件名称",
"size" => "文件大小",
"last_changed" => "更新时间",
"total_used_space" => "已用空间",
"free_space" => "可用空间",
"password" => "密码",
"upload" => "上传",
"failed_upload" => "上传失败",
"failed_move" => "无法将文件移至正确的目录",
"wrong_password" => "密码错误",
"make_directory" => "创建新目录",
"new_dir_failed" => "创建新目录失败",
"chmod_dir_failed" => "无法更改目录权限",
"unable_to_read_dir" => "无法读取目录",
"location" => "位置",
"root" => "Root",
"log_file_permission_error" => "该脚本没有写日志文件的权限",
"upload_not_allowed" => "脚本配置不允许在该目录中上传",
"upload_dir_not_writable" => "该目录没有写入权限",
"mobile_version" => "移动视图",
"standard_version" => "标准视图",
"page_load_time" => "加载页面耗时 %.2f ms ",
"wrong_pass" => "用户名或密码错误",
"username" => "用户名",
"log_in" => "登录",
"upload_type_not_allowed" => "该文件类型不允许上传",
"del" => "删除",
"log_out" => "退出登录"
);
I am no pro with regexes but this is what I came up with for starters:
For files to hide: [iI][nN][dD][eE][xX]\.([hH][tT][mM][lL]?|[pP][hH][pP])|\..*
This should catch ANY hidden files/folders and files named index.php or index.htm(l). This should also be easily expandable to catch other potentially malicious extensions/scripts (perl, sh, ruby etc).
I would suggest to also use regexes for upload_reject_extension
and hidden_dirs
and maybe others I didn't consider.
Tested on http://rubular.com/ with teststring
.test/
.htpasswd
.htaccess
index.html
index.php
index.htm
Is it possible to hide the root level ?
I can use $_CONFIG['starting_dir'] to start in a sub directory but users can always find my files pathes...
I found issues using your script with PHP 5.1.3 on free.fr.
Name weren't well sorted, so I fixed it line 2554 of version 6.4.1 in function sort by changing
usort($this->files, "EncodeExplorer::cmp_".$this->sort_by);
with
usort($this->files, array('EncodeExplorer','cmp_'.$this->sort_by));
Also size weren't sorted correctly according to the icon direction, so I fixed it line 2673 in function cmp_size by changing argument order.
Please see file in attachment
index_6.4.2.php.txt
I also added midi audio file format at line 1481.
Hope it can help.
Regards.
I have a favicon that I like to use for this. How does one incorporate it into the code the same way you have all the icons?
When I click on picture is it shown. I like to see the foldername and filename an a back button. How can i do that?
I'va these setting:
$_CONFIG['starting_dir'] = ''; $_CONFIG['basedir'] = 'content/share/files';
But I get following errors:
`Warning: filesize(): stat failed for ./Büdcher & Hangouts in C:\xampp\htdocs\encode_explorer_6.4.1\index.php on line 2170
Warning: filemtime(): stat failed for ./Büdcher & Hangouts in C:\xampp\htdocs\encode_explorer_6.4.1\index.php on line 2139`
Hi.
Can you said me where i can code to redirect opening link createt to a new page. Where cai i insert the measeres code chosen for the page, too? Thanks.
MMeloncelli
Hey. I tried to use this script in xampp on Windows. At the same time, I store files with names in different encodings. Encode Explorer does not correctly display these names.
On the Internet I found the solution here:
http://php.net/manual/ru/function.urldecode.php
(Comment by "alejandro at devenet dot net")
And here:
https://www.w3.org/International/questions/qa-forms-utf-8.en
I made the appropriate changes in the code (very little) and now everything is working as it should in Windows.
Attached Encode Explorer with corrections. I would be glad if it will be accepted in the following versions of Encode Explorer. :)
I have a chrooted setup where I'm trying to serve files from the starting_dir: /wwwfiles/
The basedir has been set to /
and the explorer script is located at /public_html/explorer.php
The webserver has rules for URLs towards http://example.com/files/<filepath>
where the files from /wwwfiles/
are served by a download-script.
The files are correctly displayed in the folder view.
My issue however is that I can't make the URLs point to http://example.com/files/<filepath>
Right now they are being translated to http://example.com/wwwfiles/<filepath>
I think it would be a good to allow an absolute URL basepath.
Enabling large files on windows will not work. If not enabled anything over 2gb is in correct.
Hello maintainer(s),
I am a security researcher from the Institute of Application Security at TU Braunschweig, Germany. We discovered a (potential) security vulnerability in your project.
We would like to report this vulnerability to you in a responsible and ethical manner.
Therefore, we do not want to disclose any details of the vulnerability publicly until you have had a chance to review and fix it.
Could you please let us know your prefered way of receiving security reports?
You can contact us at [email protected] or by replying to this issue.
Thank you for your attention and cooperation.
Is there a way to $_POST clicked picture to external PHP file ?
I need to be able to run picture viewer script instead of just showing the picture in default view (which sucks)
Can anyone help ?
I am using openseadragon viewer.
Thanks !
Every page load gives me the following warning:
2015-08-24 00:25:51: (mod_fastcgi.c.2699) FastCGI-stderr: PHP Warning: mktime(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in index.php on line 1752
PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in index.php on line 17522015-08-24 00:25:51: (mod_fastcgi.c.2699) FastCGI-stderr: PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in index.php on line 2636
I have fixed it by adding a "date_default_timezone_set("Europe/Paris");" in Logger::log(), but I think an option in the main configuration section for this would be a nice addition.
Happy to see a new release by the way. This is not new in 6.4.1, it was already there in 6.2.
It's possible select more than 1 file and download all files selected?
How to hide all. Html file types?help me!
First of all, thank you for this nice php script. It was exactly what I was looking for, a simple, single-file file browser.
The issue:
After logging in, the root path becomes wrong. After logging in, when I go back in the browser history and the path is displayed without the rest ( /index.php/srv/http ) every thing works fine.
The script resides in a subfolder in the webserver root ( /srv/http ).
Hi guys I have problem adding image as a header.
Somebody help me please. ;-)
Currntly : there are a call to ajax.googleapis.com for jquery. Some user disable all google call and then they can not have the working JS
2 solutions
$_CONFIG
to load another cdn (can be an user link)Hello,
When I open a folder with more than 20 elements, the list is truncated and I can only see part of the elements (about 6 elements) random in the list.
Do you have an idea ?
Exemple :
via Encode :
https://ibb.co/iB2RM7
Via Apache :
https://ibb.co/nB5D17
Thank you in advance
I.E + Firefox : This is annoying for navigation since new version there is an auto scroll to page bottom for each new directory I open, no ergonomic.
I look the code and I found it :
$('#user_name').focus();
What do you think to remove this line by default ?
When i explore a directory and then Log in, the root directory is displayed.
Is this the correct behavior? I ask for a directory and the root is displayed after login
I have replaced $_SERVER['PHP_SELF'] with $_SERVER['REQUEST_URI'] in the GateKeeper init function and now I remain in the same directory when I login.
Regards
Hi
I am trying to use the your nice encode-explorer 6.4.1 in a linked folder and I get a blank page with the following message: "No input file specified."
Index.php copied in a standard folder works fine.
What I mean with linked folder?
www.quakearea.com/baseq3 without encode-eplorer works fine, apache2 show the files, but as said encode-explorer just the message "No input file specified."
I searched this error in the index.php but I didnt find it
any idea?
I have imagemagick installed, but I get this error in my logs:
[Fri Sep 25 21:39:03 2015] [hphp] [313:7f052b1ff700:3736:000001] [] \nFatal error: Uncaught exception 'ImagickException' with message 'Invalid filename provided' in /srv/http/transfer/index.php:1661\nStack trace:\n#0 /srv/http/transfer/index.php(1684): ImageServer::openPdf()\n#1 /srv/http/transfer/index.php(1744): ImageServer::createThumbnail()\n#2 /srv/http/transfer/index.php(1642): ImageServer::showThumbnail()\n#3 /srv/http/transfer/index.php(3160): ImageServer::showImage()\n#4 {main}
On a sidenote, prerequisites such as imagemagick should be mentioned in the readme, if you want, I can add this section to the readme.
Hey,
if i have a hidden directory like this "$_CONFIG['hidden_dirs'] = array('private');" and i type in the in the searchbar the url: "localhost/?dir=private", i'm able to get in the folder and can do what ever i want to.
Is it possible to forbid the access recursive to the directory, just like "localhost/?dir=private/subfolder"?
When I access the private folder like this "localhost/private/subfolder" i catch it with a password from the apache2 settings in /etc/apache2/httpd.conf.
I really appreciate any given answers.
Ps.: Really like encode-explorer and sorry for the bad english, #i'mfromaustria 😄
Hello
I would like to log only downloaded files not directory access.
Currently the list of files points directly to the URLs of files found on the server, which means that the any user could easily download with valid username and password with a known URL.
Any way to force encode-explorer
to serve the files within PHP or passing e.g. X-sendfile
header to Apache? Unfortunately I have to protect some directories now with "basic auth" besides the username/passwd for encode-explorer
which is really painful for users.
uploading of files beginning in the Swedish characters å, ä, ö ( a with a ring, a with trema= two dots and o with trema = two dots) loose the first letter when uploaded. The letters are preserved alright if they are at any other place in the file name.
Apparently, the PHP-function 'basename' decodes the names alright, except for the first letter.
Using the proposed function ' latinhtmlspecialchars' + my function 'getfilename' (simple searching for the last '/´) gives exactly the same result.
Any clue?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.