Moodle
  1. Moodle
  2. MDL-24716

SCORM - Moodle 2 "No valid arguments supplied or incorrect server configuration"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      Linux Server, PHP 5.2.14, MYSQL
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      32103

      Description

      When trying to use a SCORM activity I am confronted with this error "No valid arguments supplied or incorrect server configuration" after clicking "enter". I tried turning debugging on and it also said:
      Stack trace:

      • line 379 of /lib/setuplib.php: moodle_exception thrown
      • line 39 of /pluginfile.php: call to print_error()

      I have tried the same SCORM resource on the same server running Moodle 1.9.9 with no problems, so I believe this is a bug with Moodle 2. I wonder if it has something to do with the way Moodle 2 handles files.

      I have uploaded the SCORM resource from this forum post: http://moodle.org/mod/forum/discuss.php?d=154325

      PS, My Moodle 2 was upgraded from Moodle 1.9.9

        Activity

        Hide
        Dan Marsden added a comment -

        Hi There,

        have you tried to create a new SCORM object on your 2.0 site with this object or are you trying to use an upgraded SCORM object?

        I've just installed it on my 2.0 site and it appears to work fine.

        • have you tried any other SCORM objects?
        Show
        Dan Marsden added a comment - Hi There, have you tried to create a new SCORM object on your 2.0 site with this object or are you trying to use an upgraded SCORM object? I've just installed it on my 2.0 site and it appears to work fine. have you tried any other SCORM objects?
        Hide
        Dan Marsden added a comment -

        testing on qa.moodle.net seems to work fine too:
        http://qa.moodle.net/mod/scorm/view.php?id=59
        (NOTE: this will get removed in about 25min when the QA site is automatically refreshed)

        Show
        Dan Marsden added a comment - testing on qa.moodle.net seems to work fine too: http://qa.moodle.net/mod/scorm/view.php?id=59 (NOTE: this will get removed in about 25min when the QA site is automatically refreshed)
        Hide
        Reuben added a comment -

        Yes, I have tried several different SCORM packages on both sites and 1.9.9 works fine, yet 2.0 does not.

        I have just created a brand new 2.0 site from scratch to make sure it wasn't anything to do with the upgrade and I noticed that if you set the scorm to open in a new window I get the error above: "no valid arguments supplied or incorrect server configuration". However if I set the Scorm to open in the current window it just draws a blank. It does not give the error, it just appears with no content.

        Show
        Reuben added a comment - Yes, I have tried several different SCORM packages on both sites and 1.9.9 works fine, yet 2.0 does not. I have just created a brand new 2.0 site from scratch to make sure it wasn't anything to do with the upgrade and I noticed that if you set the scorm to open in a new window I get the error above: "no valid arguments supplied or incorrect server configuration". However if I set the Scorm to open in the current window it just draws a blank. It does not give the error, it just appears with no content.
        Hide
        Dan Marsden added a comment -

        can you please attach the output from your php info page inside your moodle 2.0 site?

        Show
        Dan Marsden added a comment - can you please attach the output from your php info page inside your moodle 2.0 site?
        Hide
        Dan Marsden added a comment -

        adding Petr as a watcher in case he has any ideas... I suspect slashargs isn't working but it sounds like a 1.9 site on the same server works fine (with slashargs)

        either that or something like a missing php extension..

        Reuben - can you make sure that zip support is included in your PHP build? (we can verify that if you attach the results from your phpinfo page)

        Show
        Dan Marsden added a comment - adding Petr as a watcher in case he has any ideas... I suspect slashargs isn't working but it sounds like a 1.9 site on the same server works fine (with slashargs) either that or something like a missing php extension.. Reuben - can you make sure that zip support is included in your PHP build? (we can verify that if you attach the results from your phpinfo page)
        Hide
        Reuben added a comment -

        Hi, hope this helps.

        Show
        Reuben added a comment - Hi, hope this helps.
        Hide
        Dan Marsden added a comment -

        do you still have the 1.9 site running? - it wouldn't surprise me if Godaddy have made a server config change that is causing issues

        try turning
        cgi.fix_path_info=Off:

        in your ini file to see if that makes any difference.

        Show
        Dan Marsden added a comment - do you still have the 1.9 site running? - it wouldn't surprise me if Godaddy have made a server config change that is causing issues try turning cgi.fix_path_info=Off: in your ini file to see if that makes any difference.
        Hide
        Dan Marsden added a comment -

        this definitely appears to be an issue with the way godaddy sites handle PATH_INFO (slash arguments)

        Show
        Dan Marsden added a comment - this definitely appears to be an issue with the way godaddy sites handle PATH_INFO (slash arguments)
        Hide
        Petr Škoda added a comment -

        The path info hacks should work in a similar way on Apache compatible servers. The IIS is always a big pain, the biggest problems there is how to get the utf-8 encoded filenames there because it tends to use good old DOS encodings for all file names - bloody mess that can be worked around by using URL rewriting plugins.

        I might fix it, but I would need to upload my test scripts on the problematic server and do some tests there.

        Show
        Petr Škoda added a comment - The path info hacks should work in a similar way on Apache compatible servers. The IIS is always a big pain, the biggest problems there is how to get the utf-8 encoded filenames there because it tends to use good old DOS encodings for all file names - bloody mess that can be worked around by using URL rewriting plugins. I might fix it, but I would need to upload my test scripts on the problematic server and do some tests there.
        Hide
        Dan Marsden added a comment -

        although IIS 7+ should work out of the box from memory - and IIS 6 with one of the Service Packs works too (working from memory here) - the url rewrite tool worked well for IIS 5 and earlier version of IIS 6

        Reuben is using a godaddy Apache based site (I think)

        Show
        Dan Marsden added a comment - although IIS 7+ should work out of the box from memory - and IIS 6 with one of the Service Packs works too (working from memory here) - the url rewrite tool worked well for IIS 5 and earlier version of IIS 6 Reuben is using a godaddy Apache based site (I think)
        Hide
        Reuben added a comment -

        Hi Guys, yes I am using GoDaddy on a Linux server.
        I still have Moodle 1.9 and it still works fine.

        I tried the PHP.ini change you suggested (cgi.fix_path_info=Off) but it made no difference to either of them. I will attach my current php5.ini incase that's relevant.

        Cheers
        PS I have tried turning Slasharguments on/off

        Show
        Reuben added a comment - Hi Guys, yes I am using GoDaddy on a Linux server. I still have Moodle 1.9 and it still works fine. I tried the PHP.ini change you suggested (cgi.fix_path_info=Off) but it made no difference to either of them. I will attach my current php5.ini incase that's relevant. Cheers PS I have tried turning Slasharguments on/off
        Hide
        Reuben added a comment -

        PHP5.ini attached

        Show
        Reuben added a comment - PHP5.ini attached
        Hide
        Reuben added a comment -

        Petr, you're welcome to have access to my server if that would help you.

        Show
        Reuben added a comment - Petr, you're welcome to have access to my server if that would help you.
        Hide
        Reuben added a comment -

        So do you guys think this is a problem with my server even though Moodle 1.9 works fine with SCORM?

        Show
        Reuben added a comment - So do you guys think this is a problem with my server even though Moodle 1.9 works fine with SCORM?
        Hide
        Dan Marsden added a comment -

        I'm pretty sure it's a problem with the way godaddy manages the PATH_INFO server var - they screw with it a bit - there's a lot of posts on the interweb about this (not just related to Moodle)

        We "might" be able to improve it by adding a check to PATH_INFO_ORIG to Moodle core - but this would need a bit more testing to make sure that it doesn't screw with the chars and allows unicode

        Show
        Dan Marsden added a comment - I'm pretty sure it's a problem with the way godaddy manages the PATH_INFO server var - they screw with it a bit - there's a lot of posts on the interweb about this (not just related to Moodle) We "might" be able to improve it by adding a check to PATH_INFO_ORIG to Moodle core - but this would need a bit more testing to make sure that it doesn't screw with the chars and allows unicode
        Hide
        Reuben added a comment -

        Well would I be able to copy the SCORM Module from 1.9 over to 2.0 then?

        Show
        Reuben added a comment - Well would I be able to copy the SCORM Module from 1.9 over to 2.0 then?
        Hide
        Dan Marsden added a comment -

        if that was possible (which it isn't) - it still wouldn't resolve the issue as isn't really related to SCORM but how Moodle 2.0 handles files.

        it would be easier to find a webhost that didn't screw with PATH_INFO

        Show
        Dan Marsden added a comment - if that was possible (which it isn't) - it still wouldn't resolve the issue as isn't really related to SCORM but how Moodle 2.0 handles files. it would be easier to find a webhost that didn't screw with PATH_INFO
        Hide
        Dan Marsden added a comment -

        ..or wait for someone else to find a resolution for Godaddy users.

        Show
        Dan Marsden added a comment - ..or wait for someone else to find a resolution for Godaddy users.
        Hide
        Reuben added a comment -

        OK Thanks, I will wait and see what happens. Hopefully it's not just me having this problem.

        Show
        Reuben added a comment - OK Thanks, I will wait and see what happens. Hopefully it's not just me having this problem.
        Hide
        Petr Škoda added a comment -

        reassigning to self, going to create some test script that should try to gather necessary info for the diagnostics of this problem, going to post it here later this week...

        Show
        Petr Škoda added a comment - reassigning to self, going to create some test script that should try to gather necessary info for the diagnostics of this problem, going to post it here later this week...
        Hide
        Petr Škoda added a comment -

        Please upload this to your moodle server and the try to access this script:
        http://yoursite.example.com/moodle20/pathinfodump.php/xx/šš

        and then save the result into file and post it here or mail it to me.

        It should contain all information I need in order to diagnose and possible fix the issue.

        Petr Skoda

        Show
        Petr Škoda added a comment - Please upload this to your moodle server and the try to access this script: http://yoursite.example.com/moodle20/pathinfodump.php/xx/ šš and then save the result into file and post it here or mail it to me. It should contain all information I need in order to diagnose and possible fix the issue. Petr Skoda
        Hide
        Petr Škoda added a comment - - edited

        Stupid misconfigured Jira tracker!! please add some unicode chars to the url

        Show
        Petr Škoda added a comment - - edited Stupid misconfigured Jira tracker!! please add some unicode chars to the url
        Hide
        Reuben added a comment -

        Here is the output of the file you requested.

        You guys are really doing some hard work - its much appreciated

        If it turns out it is just Godaddy and Moodle 2.0 then I'm OK if I have to move web hosts.

        Show
        Reuben added a comment - Here is the output of the file you requested. You guys are really doing some hard work - its much appreciated If it turns out it is just Godaddy and Moodle 2.0 then I'm OK if I have to move web hosts.
        Hide
        Petr Škoda added a comment -

        Should be fixed now, please test and reopen if necessary.
        Thanks for the report and cooperation.

        Petr Skoda

        Show
        Petr Škoda added a comment - Should be fixed now, please test and reopen if necessary. Thanks for the report and cooperation. Petr Skoda
        Hide
        Reuben added a comment -

        Yes I can confirm this works. Thank you very much!!!

        Show
        Reuben added a comment - Yes I can confirm this works. Thank you very much!!!
        Hide
        David Price added a comment -

        sorry if this post is inappropriate, but using 2.0.3+, health.php shows no problems with my site's slashtag handling but get identical problem to the one originally reported for this issue (same debug stack trace when attempting to access the SCORM activity). standard server configuration, tested the AcceptPathInfo On etc... has this definately been fixed in 2.0.3?

        Show
        David Price added a comment - sorry if this post is inappropriate, but using 2.0.3+, health.php shows no problems with my site's slashtag handling but get identical problem to the one originally reported for this issue (same debug stack trace when attempting to access the SCORM activity). standard server configuration, tested the AcceptPathInfo On etc... has this definately been fixed in 2.0.3?
        Hide
        Reuben added a comment -

        This year I switched hosting companies anyway, so if you're with Godaddy I can't really comment other than to say 2.0.3 works fine for me. You could try turning the slash arguments on/off in moodle to see if that makes a difference. Good luck.

        Show
        Reuben added a comment - This year I switched hosting companies anyway, so if you're with Godaddy I can't really comment other than to say 2.0.3 works fine for me. You could try turning the slash arguments on/off in moodle to see if that makes a difference. Good luck.
        Hide
        David Price added a comment -

        Is there any way this could be reconsidered as a possible unresolved bug with Moodle?

        I feel this could occur for other users, based on:-
        ■we dont use Godaddy
        ■error pluginfile.php line 38 - "relative path must start with /"
        ■SCORM works perfectly for us with 1.9.9
        ■have installed completely new Moodle 2.0.3 (latest build)
        ■using mainstream SCORM packages from Heinemann / Hodder
        ■have repackaged the SCORM zip files via www.reload.ac.uk
        ■have tried the scorm.zip file attached to this issue (same error)
        ■standard red hat linux 2.6.9-89.35.1 / apache 2 / php 5.2.14
        ■en/dis abled slash arguments
        ■AcceptPathInfo on added via /etc/httpd/conf/site/accept
        ■moodle/admin/health.php reports no problems

        Show
        David Price added a comment - Is there any way this could be reconsidered as a possible unresolved bug with Moodle? I feel this could occur for other users, based on:- ■we dont use Godaddy ■error pluginfile.php line 38 - "relative path must start with /" ■SCORM works perfectly for us with 1.9.9 ■have installed completely new Moodle 2.0.3 (latest build) ■using mainstream SCORM packages from Heinemann / Hodder ■have repackaged the SCORM zip files via www.reload.ac.uk ■have tried the scorm.zip file attached to this issue (same error) ■standard red hat linux 2.6.9-89.35.1 / apache 2 / php 5.2.14 ■en/dis abled slash arguments ■AcceptPathInfo on added via /etc/httpd/conf/site/accept ■moodle/admin/health.php reports no problems
        Hide
        David Price added a comment -

        Hi if anyone has time please could someone take a look at the attached output from Petr's pathinfodump program? Is there anything here to show our server is messing with relative paths? (so sick of "No valid arguments supplied or incorrect server configuration" with scorm and course images) Any advice much appreciated.
        environment and php screenshots attached.
        David

        Show
        David Price added a comment - Hi if anyone has time please could someone take a look at the attached output from Petr's pathinfodump program? Is there anything here to show our server is messing with relative paths? (so sick of "No valid arguments supplied or incorrect server configuration" with scorm and course images) Any advice much appreciated. environment and php screenshots attached. David
        Hide
        David Price added a comment -

        Apologies for clogging up this tracker issue with our problems :-

        It turned out that AcceptPathInfo was set on in Apache's httpd.conf but fixpathinfo wasnt correct and our PHP is being processed through php.cgi.

        Moodle 2.0 Scorm and course images all displaying correctly finally!! also can turn slash arguments on without all other images disappearing. This was a challenging one :-o Had to dump from weblib.php to prove that PATH_INFO was null before web host could pinpoint the problem.

        Final response from our web host below:-

        ----------------

        Apologies for not being around to assist earlier but I have taken a look at the issue regarding PATH_INFO and found the solution.
        As per http://bugs.php.net/bug.php?id=34554 (or more specifically the Google cached version as bugs.php.net is down currently), the php.ini setting "cgi.fix_pathinfo" needed changed to allow the PATH_INFO variable to be set properly when running PHP as php-cgi.

        I have disabled this option (set to cgi.fix_pathinfo = 0) and confirmed that the example link you provided does now work properly

        Show
        David Price added a comment - Apologies for clogging up this tracker issue with our problems :- It turned out that AcceptPathInfo was set on in Apache's httpd.conf but fixpathinfo wasnt correct and our PHP is being processed through php.cgi. Moodle 2.0 Scorm and course images all displaying correctly finally!! also can turn slash arguments on without all other images disappearing. This was a challenging one :-o Had to dump from weblib.php to prove that PATH_INFO was null before web host could pinpoint the problem. Final response from our web host below:- ---------------- Apologies for not being around to assist earlier but I have taken a look at the issue regarding PATH_INFO and found the solution. As per http://bugs.php.net/bug.php?id=34554 (or more specifically the Google cached version as bugs.php.net is down currently), the php.ini setting "cgi.fix_pathinfo" needed changed to allow the PATH_INFO variable to be set properly when running PHP as php-cgi. I have disabled this option (set to cgi.fix_pathinfo = 0) and confirmed that the example link you provided does now work properly

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: