Closed isetz closed 10 years ago
That's weird. I think I need some background information to figure this out. Which version of Moodle are you using? Do you have Moodle's proxy settings filled in? Do you access the internet through a proxy server? Are you using Moodle with http or https?
Unfortunately, I have no ideas at the moment but I'll certainly try to come up with something.
Yeah it's weird, I don't know where the problem could be. I'm using Moodle 2.5.1, no proxy settings, I don't access the internet through any proxys either. I'm using it with http. Thank you!
I assume folder and file resources work like they should in your installation. Oh, which webserver and OS are you using by the way?
Yes, actually I set up a local repository to upload the videos using FTP but when this issue happened I thought maybe it could be related with some misconfiguration and I just uploaded the video file. If I upload the video into a page resource (using the media button from the moodle editor) a link appears and it works although it doesn't show in the page, there I only see a link but the link opens into a new page showing the video, so I assumed it uploads without problems.
I'm using apache 2.2 under linux OS. I'll also try it with another local moodle install, to see if it happens.
I have a couple of local moodle installs on OS X with Apache and then run it in production at work on Windows with IIS, so I probably need to setup a linux virtual machine as well in order to better test the plugin.
Please let me know how it goes in your local moodle install.
I was out this weekend and I couldn't test locally, but I just noticed something. In the error that shows up on Firebug Console, the URL that is trying to access is http://my_moodle_url/pluginfile.php/152/mod_videofile/videos/0/small.mp4 and, as I already said, if I try to access the URL I get a moodle error page "No valid arguments supplied or incorrect server configuration". If I modify the URL to be http://my_moodle_url/pluginfile.php?file=/152/mod_videofile/videos/0/small.mp4 then I get no error and I can see the video there.
Aha, perhaps it has something to do with "slasharguments" (a moodle configuration parameter). I think most people that turn slasharguments off are using IIS and want to fix unicode filename problems. I've tested with IIS and slasharguments set either way but perhaps it works differently under Linux.
Do you have slasharguments turned off by any chance? You can find this setting at Site Administration -> Server -> HTTP. The slasharguments is checked (i.e. set to "Yes") by default.
It's not checked. Maybe I disabled it, but I don't remember. I just enabled it but CSS don't load well, I assume I'll have to purge the caches?
--update-- Answering my own question, its not a cache problem. It seems the server is not parsing correctly the URLs when I enable the "slasharguments" option. I think my hosting provider has PHP set as CGI and it seems I need to set cgi.fix_pathinfo = 0 to make it work. I'll tell if the video works after those changes.
Great, at least we've pinpointed the problem. My plugin should definitely work with slasharguments both on and off so I don't know if you should have to change it if it works otherwise.
In my experience, changing slasharguments is much more serious than what the moodle settings page suggests. On the other hand, if you can get it working with slasharguments on, it's definitely best.
For example, when we turned it off (to get IIS to handle filenames with international characters), we noticed after a while that we couldn't use folder resources for hosting mini web sites (set index.html as main file, and link from it to the other files in the folder by using relative links). Anything with relative links can't be used (e.g. in folder resources as mentioned previously and SCORM resources). This is a documented downside to turning slasharguments off, albeit a bit hidden in the documentation.
Well, now I know how to enable slasharguments and it seems to work more or less, but I'll have to work on it a bit more because I still get some errors. I'm not sure, it seems like cache issues even after purging all caches.
Anyway, the thing is that I've disabled slasharguments again to avoid weird errors happening to my moodle users, but surprisingly I've just found out that now the videofile doesn't throw the 407 error and, actually, it works! :v: I'm thinking maybe it could be an issue with my hosting... I'll test further adding other videos now.
Thanks!!
Closing this issue.
Hi, I was intended to use this plugin in my moodle installation but I can't make it work. I just add a new videofile type resource to my course and add the video file (mp4 small file with testing purposes). I left the course image and caption blank. When I save and go to the resource I can see the video player with the moodle logo in it, but I hit play and the video doesn't load.
Using Firebug (I also debugged using chrome, with same results) the following error shows in console : "NetworkError: 407 Proxy Authentication Required -http://my_moodle_url/pluginfile.php/152/mod_videofile/videos/0/small.mp4"
And, actually, if I go to that URL moodle tells me that something is wrong with it.
Thanks in advance.