I'm using Moodle 3.5.2+ (Build: 20181023) and I've been having problems uploading files using moodle's own tools for several days now, either by adding a file resource using the add file button where when I see that it has uploaded up to 100% the browser remains in an infinite loop (I've checked in Chrome and Mozilla). (See image 1)
If I use the option "You can drag and drop files here to add them" then I see how they upload pdf files but then they are deleted automatically appearing the error message when connecting to the server. With other files until a couple of days ago also had problems but now only with PDF. It is very rare because I can upload txt, doc, or jpg. (See image 2)
When uploading PDF files with the Drag & Drop option it turns out that when uploaded it is deleted and the error message appears "error conecting to the server". See image 3
As a teacher I have solved it by uploading the files to a repository I have in Moodledata by FTP and then I can add them to the course without problems.
But the main problem is that the students in the Assignments cannot upload PDF files which I would like to solve.
I've been experiencing these problems since the last Moodle updates, I didn't have them before.
I appreciate any suggestion or help,
In the parameters post_max_size and pload_max_filesize, I have 512 M as much as local Value and Master Value.
A 31kb file uploads it without problems but a 173 file when I try to upload it with the file selector stays in a loop and the upload never ends but when I upload it by the drag and drop method when it seems that the whole file has been uploaded and I even I to see it written but soon the file disappears and the error message "connecting to the server·appears".
It is clear that 31kb files are uploaded without problems and files of 173 or more give error. However, in PHP Information it says that you could upload files up to 512 M. Where could the error be?
Translated with www.DeepL.com/Translator
I think that the answer is here:
They say that I have to modify this file fcgid.conf but I have moodle in a share hosting and I do not know how to change that file. But I have been contacting with soport and they do not know how to solve the problem. It is irritating.
It seems that I will have to follow these steps:
- Edit the FastCGI configuration file, located at:
- Add this line to your configuration file (just below all of the other lines that start with 'Fcgid'):
- Restart your Apache web-server service with this command:
service httpd restart
I have a similar problem with wordpress and I have been reading this post and I think that it could be the solution:
WordPress HTTP Error on image, jpg, png, pdf uploads
Does the above error look familiar? It probably doesn’t happen on file uploads less than 128kb right?
If you have searched around and can’t find the answer, read on.
If you are running Apache, and have Set PHP to run as FastCGI, this is probably your solution. The information below is specifically for Centos Plesk users. FcgidMaxRequestLen –>This is your problem. Before updating to the newest version, it was defaulted to 1gb. Now it is 128kb.
Quick fix if you are command line savy:
- SSH into your server
- Use your preferred editor (nano or vi) to edit the following file
- Paste the following just before the final closing </IfModule> tag
- Don’t forget to restart apache for the change to take effect
You should now have no issues with new uploads in WordPress.
Thanks for your answer.
I have check permissions and I got the same problem. But I upload a PDF file who is already in the server I have no problem in uploading it with the File Picker.
On the same server I have a Wordpress and when I upload the same PDF files that give problems in Moodle here also do not upload the following message: HTTP error.
The strange thing is that when I upload the pdfs that moodle upload without problems here also upload.
I cannot be certain but older themes may be missing some elements, and may well be causing this issue you have found, which may not have been reported.
If you are not using Boost theme then change to it NOW and see if that works better for you as
BOOST is the DEFAULT theme in Moodle and very uptodate.
You may also need to check to see if CRON jobs have been done, if not then they may be clogging up your database and causing problems.
YOU may also like to Clear your Browser Cache as this could be causing wrong errors displaying when in actual fact the system may be OK?
You have to consider all these things that can go wrong.
If you are not using BOOST then please give it a try! It may well be the answer to your prayers!!!
Hope this helps at least?
Thank you a lot for your answer. I am using Essential Theme, I have changed to Boost, check the CRON jobs, clear the Cache and the problems continue. I only can upload files smaller than 128kb.
With the same hosting, I also have a Wordpress installation and I have the same problem, I cannot upload files bigger than 128kb.
I have contacted the Hosting Support but they end the Chat telling me that I have to contact a Developer, but I think that they should solve the problem.
I have been doing tests and I know why it is not possible to upload files larger than 128 kb, I have done a new installation of both Moodle and Wordpress and the file upload worked perfectly, I say it worked because I noticed the web appeared as an insecure site. Then I asked the server to activate https as the installations that had problems, I was told that this had nothing to do but to activate the sites as safe and the same problem, it can not upload files greater than 128 kb.
Of course I don't like the solution of going from https to simple http.
Supporters do not know how to solve it and I do not know either and as it is rent a server I am thinking about changing to another company.
Do you have access to the Server in your Control Panal?
From memory there are some settings which control upload and download sizes.
Also Moodle sometimes has places that require upload sizes, for instance, course files. I may be wrong about this...but I recall the panic I had at the time, so I know the frustration it causes.
I’ll have a quick look to see where all these options might be.
I’ll be back as quick as I can.