Issue Details (XML | Word | Printable)

Key: MDL-9557
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Martin Dougiamas
Reporter: Zoltán Szarvas
Votes: 1
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

SCORM import blank screen (caused by set_time_limit())

Created: 24/Apr/07 07:23 PM   Updated: 11/Aug/08 05:38 PM
Return to search
Component/s: SCORM
Affects Version/s: 1.8
Fix Version/s: 1.8.1

Environment: PHP 5.2.0, MySql 5.0.27

Database: MySQL
Participants: aaron.danker@pixelphish.com, Martin Dougiamas and Zoltán Szarvas
Security Level: None
Resolved date: 06/Jun/07
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_18_STABLE


 Description  « Hide
I tried to import SCORM courses into Moodle. Lot of these courses could be imported, but several ones couldn't be imported. No error message, just a blank screen. After some debugging (I set $db->debug=true and I turned on the error reporting) I found that the error was occured because the 5 seconds timeout exceeded. In php.ini the timeout value was 30 seconds. I continued the debugging and found the timeout setting statement in the "moodle\mod\scorm\locallib.php" file in the scorm_delete_files($directory) function. The course was successfully imported after I removed the statement.

I think, this statement causes the error, because it overriddes the the default php.ini value. It restarts the max_execution_time counter, but only 5 seconds remain to finish any other operation after last set_time_limit() call. If the course is "big" this time value isn't sufficient.


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
moodler committed 1 file to 'Moodle CVS' on branch 'MOODLE_18_STABLE' - 06/Jun/07 05:16 PM
Fix for MDL-9557 and MDL-9007 (increased timeout when deleting files)
MODIFY mod/scorm/locallib.php   Rev. 1.34.2.5    (+2 -2 lines)
moodler committed 1 file to 'Moodle CVS' - 06/Jun/07 05:19 PM
Merged fix for MDL-9077 and MDL-9557
MODIFY mod/scorm/locallib.php   Rev. 1.43    (+6 -7 lines)
Martin Dougiamas added a comment - 06/Jun/07 05:21 PM
Fixed in CVS (changed the timeout to zero)

Martin Dougiamas made changes - 06/Jun/07 05:21 PM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Assignee Roberto Pinna [ upo ] Martin Dougiamas [ dougiamas ]
Fix Version/s 1.8.1 [ 10213 ]
aaron.danker@pixelphish.com added a comment - 01/Feb/08 05:24 AM
What is the maximum file size that can be executed/unzipped and used within the system or where can I increase this timeout to allow for larger file-sizes?

Zoltán Szarvas added a comment - 02/Feb/08 02:53 AM
The timeout value is currently set to zero that means no timeout is used (http://php.net/set_time_limit), so while uploading the time will never expire.

The maximum file size is the another issue, it can be configured in the php.ini. using the 'post_max_size' and 'upload_max_filesize' parameters. For further informations see this page: http://docs.moodle.org/en/Installing_Moodle#Check_PHP_settings


Dan Marsden made changes - 11/Aug/08 05:38 PM
Status Resolved [ 5 ] Closed [ 6 ]