Cannot upload image/video to the library, file is too small

Hi there, I am trying to upload a couple pictures to the library in the CMS to use on some layouts but every time I do I get an error message saying the file is too small. I’ve seen quite a few things discussing files that are too large but this seems to be the exact opposite problem. The attached picture shows what I see when I try to upload an image. The same message will apply with multiple images and with video uploads. I have even tried intentionally large image files and I still get the same error (think 2-3M instead of 314K). Any help would be appreciated. thank you!

Hi,

Is it possible that you increased min_file_size in php.ini by mistake ?

I havent actually made any changes to file size in php. In fact I havent really even touched the php stuff at all. I went looking after reading your message and I think I found the correct location and everything but I only see a setting to change max upload size via “upload_max_filesize = 2M” As far as I can tell there isn’t a setting for min_file_size that I can see. Maybe I am looking in the wrong place?

Well since on your screenshots you have max file size set to 128 I can only assume that you edited the correct php.ini file.

I am also quite sure that you didn’t change some random lines there, so it’s interesting error ‘file is too big’ is quite common but ‘file is too small’…well not so much.

Could you please double check that all the correct lines in php.ini are changed as described here: How do I upload files bigger than 2MB / How can I increase the upload file size limit?

and restart your server again after that.

So based on what you said about the max file size being 128 I am wondering if I am even looking in the correct place. The system I am using was originally setup by someone else and I was tasked with making it work again. From what I have been looking at I see the following:
upload_max_filesize = 2
post_max_size = 8
memory_limit = 128
max_execution_time = I did not find this

max_input_time = same as execution time

Because of that I am beginning to think that I am just flat out looking at the wrong thing which could very easily be why I am having so much trouble. I’ve attached the following picture just to show what exactly it is that I am looking at and the highlighted stuff are the exact files I have been looking in.


Again thank you very much.

Well you might be looking in a wrong directory, yes.

On your screenshot it’s clearly visible that you can upload files with max size of 128M so it should be the same value in the right php.ini

Depending on which webserver are you using the path will be slightly different.
Do you know what webserver do you have?

I’d guess that XAMPP in which case you should be looking for:
Windows (with XAMPP): install_path\xampp\php\php.ini - eg c:\xampp\php\php.ini

examples for Linux servers:
By default, the php.ini file is in the following locations:
Ubuntu (with Apache): /etc/php5/apache2/php.ini
Ubuntu (with php-fpm - for example with nginx or lighttpd): /etc/php5/fpm/php.ini

Going through the IIS Manager and navigating to PHP settings opens up an .ini file (I believe the php configuration settings file from my above screenshot) Looking in there I find that upload_max_filesize = 128, max_execution_time = 30 and max_input_time = 60. post_max_size and memory_limit are not found in that file. The server I’m on is running MS server 2012 R2 datacenter. I also know that MySQL server 5.1 is installed. I apologize for being difficult, this side of things is generally out of my element.

Here is all the core php settings which are from the form detailed in Microsoft’s article here: https://technet.microsoft.com/en-us/library/hh994592.aspx. The relevant bit is
“To test your PHP installation
Open a text editor, for example Notepad, as Administrator.
In a new file, type the following text: <?php phpinfo(); ?>
Save the file as C:\inetpub\wwwroot\Phpinfo.php.
Open a browser and enter the following URL: http://localhost/phpinfo.php
A nicely formatted webpage is displayed showing the current PHP settings.”
I did that and the attached is the core settings. If there is anything else that can help please let me know.Thanks again

So this is odd…

min_file_size isn’t a php directive as I had initially thought - it is a configuration option of the file upload tool, which has a default setting of 1 byte, so I imagine that we are actually looking at a problem uploading the file which results in a 0 byte file (this is a guess of course).

Do you have any notices on the fault page in Xibo? And if not can you follow the instructions on that page and see if we get any additional Xibo Logging which might help diagnose the problem?

So I went and tried to upload again, receiving the same error. After that I went to the log tab under the advanced section. The attached picture has the 2 errors, 1 for the image I tried to upload and 1 for the video I would assume. Is this possibly an issue with the jquery used to upload media?

Thank you for all your help!

So I went into the uploadhandler.php file located in C:\inetpub\wwwroot\3rdparty\jquery-file-upload\uploadhandler.php and changed the min_file_size from 1 to a null value. This has allowed me to start uploading images and videos. I think this is a work around but doesnt actually solve the problem; which seems to likely be the 0 byte change Dan was referring to in his last post. While I am working currently, it would be nice to see if we can figure out what the actual underlying issue is/was. I have attached a picture just to show exactly what I changed.

Thanks

So I think what you’ve done as a workaround is prevent the upload script from accessing the temporary file to check whether it is too large / too small - effectively saying “accept any file that manages to get uploaded”.

I don’t necessary think that is a bad workaround.

What is slightly odd is that your installation is preventing file access to its own temporary file location - whether that is because the temporary file location has been modified, or because the open_basedir directive has been modified - i’m not sure.

I think adding ".....;C:\Windows\TEMP\" (the … being what is already there) to the end of your open_basedir directive would fix the issue, but I urge you to do your own research into whether that is a good idea or not… or whether changing the temporary file location to inside inetpub\wwwroot would be better.

As soon as I installed version 1.8 and I have this problem: cannot upload video to the library, file is too small…

How did you install it via docker or is it custom installation?

What your ‘File download mode’ in CMS settings -> general

“Request Entity Too Large” is a HTTP error 413. - Error “Request Entity Too Large” uploading video

I have installed custom !!

if I upload images (png or jpg) works properly, but if I try a video is the problem. I use a https connection, it could be a problem?

why it doesn’t appear to upload?help me someone

I would recommend creating a new post for this issue. Please include on the new post:

  • CMS Version and installation type (Docker or Custom)
  • More information about what you are doing and what is happening. If you are receiving any error messages, please also pass those on.

The screenshot you have provided also suggests that you are uploading the media from inside the Layout Designer. Have you also tried to Upload media under the Library option in your CMS?

Many Thanks.