Responsive Filemanager doesn't upload files bigger than ~2MB - file-upload

I use Responsive Filemanager for several websites that I host. I have the latest version (9.6.6) installed, and I also use the tinyMCE plugin for the Jquery tinyMCE version 4, but my problem occurs with both the standalone filemanager as well as the plugin, so I doubt this is important.
Anyhow, my problem is the following: everything seems to be working just fine when I upload files smaller than exactly 2 megabytes. Using a dummy file generator, I have been able to generate a PFD file of exactly 2097152 bytes, which uploads fine, and a PDF file of 2097153 bytes, which doesn't upload.
Responsive Filemanager always says the upload went fine (with both the Standard Uploader and the JAVA uploader), but any file bigger than 2097152 bytes doesn't actually get uploaded.
Here's a video demonstrating precicely what the problem is: https://youtu.be/NDtZHS6FYvg
Since my RF config allows files up to 100MB (see entire config here: http://pastebin.com/H9fvh1Pg), I'm guessing it might be something with my server settings? I'm using XAMPP for Windows. Could it be that there are some settings in my Apache config or something like that, which block uploads through http bigger than 2MB?
Thank you for your help!
EDIT: typo's and added links + video showing the problem.

I managed to find the solution for my own problem. I couldn't believe some sort of bug would cause any file exactly bigger than 2 MB to fail, so after a while I finally figured out it had to be something with the server itself, and indeed, in the php.ini I found the following line:
upload_max_filesize = 2M
Changing this to a bigger number fixed the problem for me. Would be nice if ResponsiveFileManager had a way of informing the user about the fact that the upload did in fact not complete successfully due to a php.ini server setting, but ah well...

You just need to change the config file of responsivefilemanager, i.e config.php
'MaxSizeUpload' => 10,
Just change the MaxSizeUpload variable and check.

Related

Reading images with special characters in Apache web server

When I try to GET images that have special characters like ấ in the filename, I can't read the files on the frontend. It will always throw a 404 error when navigating to the url as well.
My server os is CentOS, and my site is running on Apache with Nodejs. I was wondering if I have to somehow change the file encoding in order to read images with special characters. All normal images work fine, it just seems to not recognize the images with special characters at all.
There are a lot of files, which makes renaming them all not an option for me unfortunately. If anyone knows what I have to do to get the files to the correct encoding, please let me know.
Update: I've discovered a way to find the files, but I dont understand the encoding pattern. For example a file known as kt-giấy-2.jpg can be viewed directly using kt-gia%CC%82%CC%81y-2.jpg, does anyone know what kind of encoding this is? It doesnt line up with URI encoders.
For anyone that has this issue. My issue was that I transferred the files from Mac Osx to Centos directly through a zip file through Cpanel. The files are fine, but you need to use convmv to change the files. The files were readable, but they werent in the exact encoding.
Mac OSX encodes in NFC, every other os encodes in NFD
use this command in the directory of the files you want to encode differently.
convmv -r -f utf8 -t utf8 --nfc --notest .

Using Apache VFS Library Get File Size (Symbolic Link)

I utilize the Apache VFS library to access files on a remote server. Some files are symbolic links and when we get the file size of these files, it comes back as 80 bytes. I need to get the actual file size. Any ideas on how to accomplish this?
Using commons-vfs2 version 2.1.
OS is Linux/Unix.
You did not say which protocol/provider you are using. However it most likely also does not matter: none of them implement symlink chasing as far as I know (besides local). You only get the size reported by the server for the actual directory entry.
VFS is a rather high level abstraction, if you want to commandeer a protocol client more specially, using commons-net or httpclient or whatever protocol you want to use gives you much more options.

aws s3 intergration with mediawiki

I working with mediawiki.
I want to change upload directory path to aws s3, i tried these two extensions but i getting some warning message.
I dont know these extension are working correctly.
https://www.mediawiki.org/wiki/Extension:LocalS3Repo and
https://www.mediawiki.org/wiki/Extension:AWS
If anybody is working with these extension or if you achieved these in any other ways
please explain me
I have been succesfully using the method described here, though in step 6, rather than using an apache rewrite, I changed the image paths in LocalSettings.php.
(It was quite a lot of work though, and I never figured out a way to the the cache-control and expires headers on the files, which was the real reason why I wanted to do it to begin with.)

0 filesize when using move_uploaded_file()

Permissions are in line (777, owned by NGINX, etc),
Folder is writable,
File is small,
Everything I've found on Google for the last 4 hours is correct / NA
Players are NGINX, PHP-FPM, FastCGI..
I upload the file, use move_uploaded_file to move to uploads directory and the file saves. However the file, upon inspection, is 0kb and 0px by 0px. EMPTY.
Not finding this issue anywhere online?
Any thoughts?
If anyone comes across this and everything seems to be perfect.. CHECK your disk space! In my case I was using a mounted drive so I didn't get any typical low-space errors.
move_uploaded_file and copy do NOT display space issues. I had to use rename() to get any useful details.
Hope this helps some poor soul.
Someone posted a similar issue as yours here - http://bytes.com/topic/php/answers/1002-move_uploaded_file-corrupts-some-files
It seems the issue resides in transferring a GIF from a Windows machine to Linux.
Try using copy function instead. copy([source]),[destination]. If this works, that means you have a permission issue with upload temp directory.
Have you checked the permission on upload temp directory? You can find the directive/path on php.ini file(upload_tmp_dir).

Enabling Extensions

I am changing some of my PHP settings such as upload size limit etc.
I manage to increase my upload size limit with some modifications to my Loaded Configuration File: php5.ini.
So it is the right file, and changes to php5.ini takes effect.
I want to enable ldap extension too. However, i couldnt do that. I added the following line:
extension=php_ldap.dll
But it did not take any effect.
Can anybody see why?
Thanks!
If you're on Linux, adding a dll extension won't do much good since these are used by Windows.
You'd rather have to enable the .so extension.
But then again just uncommenting or adding this entry in your php.ini doesn't make the extension work automatically, it will work only if the given .so file is really there and is in the right path, resp. the path is configured correctly.
If you're on Linux and you've got a chance, you should install extensions via your package manager (apt, yum, ...) which will compile the extension into your php installation. This way you won't loose your extension after server updates which include php.
If you don't have access to your server, there is always something you can do!
a) Ask the hosting provider to enable the extension for you, good hosting providers do that.
b) Get a VPS. You'll be so much better off!! It's worth it! Check out ServerGrove!