File Upload Error: The file you are trying to upload might be too large.

kburakozdemir
Forums
Hi, I have problem about uploading images for interactive content type (say H5P) regardless of the content type of interactive content type. ) "File Upload Error: The file you are trying to upload might be too large." I can upload any files (h5p files when adding interactive content and other types of files in other content add/edit processes), every php mysql permission settings are done. nothing seems missing. the problem is about images, as far as I experienced. there is a thread in h5p.org about this issue. however it does not seem to be solved. https://h5p.org/node/7806 the error screenshot: https://yadi.sk/i/HvxZM_topu7XZ there is another error (debugging level) when I click on the add new content / interactive content. screenshot: https://yadi.sk/i/hIwAFK7Rpu8HP the screenshot of my status report of drupal (everything is ok): https://yadi.sk/i/oI9W04C4pu7bu any recommendations. thanks.
James Aparicio

Hi kburakozdemir,

Hi kburakozdemir,

I think the issue may be just a permission issue regarding the h5p file folder.

Please make sure your webserver has access to write inside the folder sites/default/h5p.

Best regards

kburakozdemir

the situation

my h5p folder is sites/default/files/h5p and user are set properly. please refer to the screenshot. https://yadi.sk/i/TbQc1bbcpuuU6
kburakozdemir

upload

as i said in my first post. I can download examples from h5p.org and upload them as new content. and it work with the same config. https://yadi.sk/i/xnHi7xBbpuv3n however no images can be uploaded into interactive content. don't know what to do! :)
James Aparicio

Hi kburakozdemir,

Hi kburakozdemir,

I still think the issue is what i mentioned. Maybe the permission is not correct for one of the required subfolders inside it. Try forcing the ownership/permissions recursivly. 

Or try temporarly setting the whole folder recursivly as 777. If you still have the issue then it is not a problem with folder permissions. But i really think it is.

Best regards 

kburakozdemir

action

hi, i made this as root chmod -R 777 /site_root_folder/sites/default/files is it correct? the result: nope! the problem still continues.... :(
kburakozdemir

mention

just to mention... there is varnish cache and memcache running for my installation. is there any possibility for this to happen because of caching issues (though I do not think so! and also because I tried if it works, after turning all cache and disable the varnish ana memcache module etc.)???
James Aparicio

Hi kburakozdemir

Hi kburakozdemir If you do chmod -R 0777 /xxx it has to contain the full path to the folder. If the site_root_folder is not at the root of the system it will not work., Best regards
kburakozdemir

:)

of course it contains the full path of drupal root folder chmod -R 777 /site_root_folder/sites/default/files where /site_root_folder/sites/default/files = /var/www/opigno/sites/default/files
kburakozdemir

just realized

in one of your previous comments (https://www.opigno.org/en/comment/2830#comment-2830) you wrote "sites/default/h5p" however my h5p folder is under files, say: "sites/default/files/h5p" does it matter? by the way when I look at the description for h5p folder in "admin/config/system/h5p", it says "Subdirectory in the directory /..../opigno/sites/default/files where files will be stored. Do not include trailing slash." so h5p folder must be under ..../files, right? you made a 'typo', I guess.
James Aparicio

Hi kburakozdemir,

Hi kburakozdemir,

If that does not fix the issue, please check the error log to see if you find anything.

If you dont find anything, take a look at the function h5peditor_files_callback inside the profiles/opigno_lms/modules/contrib/h5p/h5peditor/h5peditor.module and check why the file is not beeing saved correctly.

Best regards