Large SCORM upload error

Large SCORM upload error

by Peter Parker -
Number of replies: 16

Help. Ive looked online and gone through all the obvious steps I could find to upload a large scorm file. Uploading a 230mb SCORM course I get the following error:

An error occurred whilst communicating with the server

My host is CrazyDomains which uses cpanel (I think). If I clock upload file I get the below limit:


Does this mean I can upload through Moodle conceivably to 1.95GB?

As shown below, all limits are set at 500mb.

My .htaccess file is blank (public_html/moodle). Whenever I put this in it (its in bytes and amounts to 1024mb):

php_value upload_max_filesize 1073741824

php_value post_max_size 1073741824

php_value max_execution_time 600

...I get this error in my site:

Page Not Found

No page could be found at this address. 

I have updated PHP.ini to upload limit 2048m and time of 600:


My site upload limit is set to 500m in Admin > Security > Site Policies:


And so it is at Admin > Course Default Settings:


And same again in the course itself:




Average of ratings: -
In reply to Peter Parker

Re: Large SCORM upload error

by Albert Ramsbottom -

Hi

This looks like it might be a timeout, is it possible to raise this via the ht.access? or are you saying that it doesnt matter what you put in ht.access file, it just defaults.  either way your settings are OK so I would imagine that the server is timing out. Try raising the PHP timeout temporarily to a big figure and try that

Albert

In reply to Peter Parker

Re: Large SCORM upload error

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Turn debugging on and see if that gives you any more information.  

As well as changing the upload file size in php.ini, have you also changed the post_max_size? - that also needs to reflect the new file size limits.  You might also increase the time on the max_execution_time to enable the script to have enough time to run.

In reply to Peter Parker

Re: Large SCORM upload error

by Peter Parker -

Both my php.ini files (one in root, and the other in the root/moodle folder) are now as follows:


file_uploads = On

upload_max_filesize = 2048M

post_max_size = 2048M

upload_tmp_dir = /tmp/

max_execution_time = 6000 ;

memory_limit = 2048M


I'm still getting the error though.

In reply to Peter Parker

Re: Large SCORM upload error

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Debugging?

Did you restart apache after making changes?  Are they reflected on Moodle's php info page?

In reply to Peter Parker

Re: Large SCORM upload error

by Peter Parker -

My .htacces file in root/moodle folder is blank. When I put the following in I get an error:

My .htaccess file is blank (public_html/moodle). Whenever I put this in it (its in bytes and amounts to 1024mb):

php_value upload_max_filesize 1073741824

php_value post_max_size 1073741824

php_value max_execution_time 600

...I get this error in my site:

Page Not Found

No page could be found at this address. 

I have a .htaccess file also in root, which has the following code on it as it is part of my Concrete5 site. I have moodle installed in a subfolder (hence root/moodle folder path).

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME}/index.html !-f

RewriteCond %{REQUEST_FILENAME}/index.php !-f

RewriteRule . index.php [L]

</IfModule>


In reply to Peter Parker

Re: Large SCORM upload error

by Ken Task -
Picture of Particularly helpful Moodlers

Me thinks confusion reigns here.

Moodle software, downloaded from Moodle.org, doesn't contain an .htaccess file nor a 'recommended use' htaccess.txt file as other open sourced packages might.

Did you install manually, or did you use some one button click kinda thing to install Moodle provided by your provider?

Where you host does have customer help.   Here: https://www.crazydomains.com/help/

Suggest you become familiar with that.

Using that help, I see your server is using suPHP and there is an article about that relates (maybe not alll of the issues) in this help page:

https://www.crazydomains.com/help/how-to-make-the-php-ini-recursive-in-the-htaccess/

Just to clarify ... 'root' you've used is /pathto/your_accounts_home_directory/public_html/ and that's where the 'moodle' directory resides.   So originally, how were you accessing the Moodle?

Something like: http://site/moodle/ ?

.htaccess files are supposed to be hierarchial in nature ...  the one at the top of the structure takes precedence and any others in subdirectories change or I think in your case override the one above - which might explain the 404 error when you use an .htaccess file in 'moodle' ... wiped out the re-direct rules to find index.php.

So ... have you tried combining what's in the .htaccess file at 'root' with the redirect rules AND the parameters you are trying to enter in another .htacess file and placing that .htaccess file in your web root ... the public_html directory.   That should apply to all subdirectories - which includes your Moodle code and does use an index.php page as the default page Moodle is to serve out.

Other help pages:

https://www.crazydomains.com/help/how-to-change-the-default-index-page-in-htaccess/

The following is a help page for WordPress but me thinks it might apply to any app in user space:

https://www.crazydomains.com/help/increase-the-file-upload-size-in-wordpress/

Also has a link that describes how to php.ini recursive in .htaccess

https://www.crazydomains.com/help/how-to-make-the-php-ini-recursive-in-the-htaccess/

Something else, but related ... where is your moodledata directory?   You've not mentioned.  Many hosting providers do NOT allow moodledata outside of 'public_html' and their work-around (not used on true standalone/not share and not in user spaces) is to use an .htaccess file in there as well.  This is where I think suPHP will also come into play.   Normally, it's ok to make moodledata 'group' writable.  suPHP doesn't like that at all and will not only complain in logs but also deny ... something like 'Softexception.app' is seen in error logs (if you can see error logs).

Files upload, BTW, will eventually end up in moodledata/filedir/ so that's why am mentioning moodledata.

Comment: me thinks 'CrazyDomains' appropriately named - and y'all can take that any way ya want! smile

'spirit of sharing', Ken


In reply to Ken Task

Re: Large SCORM upload error

by Gary Benner -

HI All,

Ken's excellent answer here highlights a major consideration in provisioning Moodle. It is not just like Wordpress, In reality it is actually far more complex, and for any serious deployment, I believe it is unfair to lead people to believe they can deploy it themselves, on platforms such as "Crazy Domains" without having a Web hosting expert (not just Moodle expert) manage or at least mentor the process.

Unless you already have that expertise, or the time, budget, and leniency from your manager/boss, it is better to get help from the get go. If you value your own time, doing what you do best, then the logic is to get someone with the relevant expertise to setup and provision Moodle, and then document / handover / mentor you thereafter.

The provisioning of Moodle encompasses so many technical skill sets, from server / cluster provisioning, database and webserver configuration, SMTP and Mail integration, fail-over contingency planning, current and archival backup strategies, networking planning (server and institution), and and that hardly even touches any of the pedagogical considerations.

Because it is open source, and you can just leap in, many institutions fail to implement a formal strategic business plan for it's implementation, and they just 'fall into" it, and key people end up having to worry more about how to configure a php.ini files, rather than the more important and relevant factors for them at a higher management and pedagogical level.


HTH

Gary

In reply to Gary Benner

Re: Large SCORM upload error

by Gary Benner -

HI all,

Further to the above, having had the philosophical rant, we all started out by getting our hands dirty under the hood, so if you need help, keep asking the questions and we'll all hopefully be able to share some of the knowledge learned or gained from others and pass it on.

Gary

In reply to Gary Benner

Re: Large SCORM upload error

by Ken Task -
Picture of Particularly helpful Moodlers

I'll add 2 cents to your 'rant' ...

Part of the problem is 'feature creep' ... does more, requires more, requires more understanding.   That has happened to every open source software package I've seen and had first hand experience with.  There are companies now that didn't exist 10 years ago whose service is to assist folks choosing the 'right LMS' ... and there are tons of them now.   On a post from one such company saw a graph which didn't surprise me at all ... listed number one was Edmodo.  Of course, one had to investigate the details behind the matrix used to determine ... one which was a 'social index' number.   Hmmmmm ....

Since, in a previous life, I taught history I tend to think about things from an historical perspective ... the other day, after some frustration with Moodle, began to contemplate ... 'wonder if IBM saw it coming?' ... 'wonder if Novell saw it coming?'    There are biggies that now have 'classroom' software built into clouds ... Google, Apple, and even Microsoft (always late to the party) now.

Of course if one is not interested in 'market share' and the real clients are NOT all entities who educate, then no problem.

From time to time someone wanders into these forums and ask 'is Moodle right for me'.   I chuckle cause these forums are the heart of the 'moodle faithful' (some even blindly so).   Not sure I've ever seen a true, unbiased response to one of those questions.

Hmmmm ... now that I've ranted some too ...

Will still highly recommend the op studying hosting providers offerings/docs/faqs, etc..

'spirit of sharing', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Large SCORM upload error

by Peter Parker -

This is a 1 click install of Moodle. I've run Moodle on xampp previously and briefly on my desktop but thats the extent of my knowledge in that area. I'm pretty sure I'm on a shared server.


I edited the .htaccess file in root and added the 4 lines below after all the code:


# -- concrete5 urls start --

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME}/index.html !-f

RewriteCond %{REQUEST_FILENAME}/index.php !-f

RewriteRule . index.php [L]

</IfModule>

# -- concrete5 urls end --


suPHP_ConfigPath home3/chesimp1/public_html

php_value upload_max_filesize 20971520

php_value post_max_size 20971520

php_value max_execution_time 6000


This broke my current site in root as well as moodle in the sub folder. Does the above look correct? The home3 is specified in my file manager. 


In reply to Peter Parker

Re: Large SCORM upload error

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

It sounds like you have moodle set up as a subdomain in another site so it should be reading its php values from there and as such, the .htaccess file might not be necessary.  If it is causing you to lose access to your site, take the settings out of there.

What settings are showing in your Moodle php environment page?  Are they reflecting the changes that you made to the php.ini file?  If so, then you do not need the .htaccess

In reply to Emma Richardson

Re: Large SCORM upload error

by Peter Parker -
Ive got it in a subfolder on my site (www.chesimpson.com.au). I'm using it primarily for testing elearning courses I develop (the internal sandpit at work is just too slow). I'm also using it as an opportunity to get familiar with the new moodle, as I was an admin for 5 years some time ago).


So root(public_html)/moodle. The .htaccess file was causing it to throw an error so Ive left it blank. Im running Concrete5 cms in the root, and there is a .htaccess file there, but it has Concrete5 code on it:


# -- concrete5 urls start --

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME}/index.html !-f

RewriteCond %{REQUEST_FILENAME}/index.php !-f

RewriteRule . index.php [L]

</IfModule>

# -- concrete5 urls end --


In reply to Peter Parker

Re: Large SCORM upload error

by Ken Task -
Picture of Particularly helpful Moodlers

Server is nginx.   Truth in assisting ... I've not had experience enough with nginx to know for sure so the following is 'leg work' shared ...

Changing upload limits is 'different' than running apache and appears to be needed in two places ... php and in nginx

There's this:
https://docs.moodle.org/30/en/Nginx
which doesn't mention file size upload limits.

And there is this:
https://www.nginx.com/resources/wiki/modules/upload/#

Clip from a blog post ... not Moodle.org site/docs:
Change in Nginx config
Add following line to http{..} block in nginx config:
http {
    #...
        client_max_body_size 100m;
    #...
}

Note: For very large files, you may need to change value of client_body_timeout parameter. Default is 60s.

The value above set to ###m ... slightly over what you need for large Scorm package.

Like apache, think one needs to restart nginx services for those changes to take place.

'spirit of sharing', Ken


In reply to Ken Task

Re: Large SCORM upload error

by Peter Parker -

Hi Ken,


Thanks for your efforts. I haven't had time to check this out yet (I'm doing a UX Design course in my spare time when I'm not at work). Hence my next question could be related to where you are guiding me.


I noticed in the site settings the following line next to the upload limit:


This specifies a maximum size that uploaded files can be throughout the whole site. This setting is limited by the PHP settings post_max_size and upload_max_filesize, as well as the Apache setting LimitRequestBody.


Should I chase LimitRequestBody in Apache (so to speak)?

In reply to Peter Parker

Re: Large SCORM upload error

by Ken Task -
Picture of Particularly helpful Moodlers

Well, all three settings come into play when uploading, so why not take a few minutes to check out LimitRequestBody settings in apache?

'spirit of sharing', Ken

In reply to Peter Parker

Re: Large SCORM upload error

by Damilare O. -
Hello Che Simpson,

I can imagine how frustrating #Moodle can be.

Follow the above Suggestions as they are highly helpful. 

Ken Task is a resource Person and i would advise you read up the resources as provided by him.

I would have loved to add some suggestions but the Heroes has said it all.

Kindly Give Feedback so as to know the actual Steps that resolved this issue.


Damilare'