slasharguments: Either lose all my files or just my pictures

slasharguments: Either lose all my files or just my pictures

by Graham Robinson -
Number of replies: 11
After hours of tweaks I have my moodle site and am uploading the learning objects to the course we are running but have hit a problem.

When I first installed Moodle I found that user's profile pictures were not loading when I used file.php/pic.jpg in the site variables page so I changed it to file.php?file=/pic.jpg. Horrah, it worked!

But now I'm loading up the learning objects and they don't have any pictures sad

The reason seems to be that the pages have been made to be relative (as it should be) so we use img src="student.jpg".

When using the file.php? argument the relative link becomes http://moodleserver/student.jpg and it isn't found.

So if I presume that I just need to use file.php/pic.jpg what could I be doing wrong? Is there a PHP.ini line that needs to be changed that I can't see or something in moodle that I haven't set?

Thanks for any help on this!

Graham
University of Southampton
Average of ratings: -
In reply to Graham Robinson

Re: slasharguments: Either lose all my files or just my pictures

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Graham,

Could you tell us whether you're using IIS or Apache? Also, are the learning objects you refer to Scorm packages?
In reply to Helen Foster

Re: slasharguments: Either lose all my files or just my pictures

by Graham Robinson -
Hi there,

I was going to whack a few screenshots together to show what I'm talking about but in the meantime...

IIS on Server 2000 (patched up) running
PHP 5.0.4

No scorm anywhere, I was reading that there seems to be a problem with that

For file.php/ I lose every picture and all the files in the moodledata folder

For file.php? I lose pictures that are inside the learning objects (i.e. the moodledata/1/file.html works fine but a picture insiden it that points to moodledata/1/pic.jpg just points to moodleserver/pic.jpg).

I'll just bash some screengrabs together now.

[Edit]
Screenshots
Argument: file.php/






Arguement: file.php?



In reply to Graham Robinson

Re: slasharguments: Either lose all my files or just my pictures

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Would you consider swapping to Apache? (It may well solve more potential problems!)
In reply to Helen Foster

Re: slasharguments: Either lose all my files or just my pictures

by Graham Robinson -
It depends on whether that would be the ONLY way to fix this problem...

I think I'd actually prefer doing a find and replace on all the learning objects than change server technologies at this stage. Anyway, universities like Windows servers, we get them cheap.
In reply to Graham Robinson

Re: slasharguments: Either lose all my files or just my pictures

by Ali Press -

Sounds like you need ISAPI rewrite.  We had exactly the same problem you mention with IIS and ISAPI fixed it.  There is a really helpful post on this, that also contains the rewrite string - try searching for isapi rewrite.

This is the body of the post that we learnt from:

Hi,

If you are uisng IIS server to host Moodle and Scorm module and have to use slash arguments, you can use a freeware to rewrite your URL. I got that working on my Windows XP Pro, running IIS 5.

The website is: http://www.isapirewrite.com/.

You can get the "ISAPI_Rewrite Lite" which is free, if you don't need per-virtual-site configurations. Here's the rule I used for rewrite splash arguments:

RewriteRule (.*?\.php)(\/.+) $1\?file=$2 [N,I]

I haven't tried this on Windows 2003 Server with IIS 6.0, though. There's a special note for Win2k3 and IIS 6.0 in their documentation.

Good luck! smile

Nancy

But it was pasted into another message so I can't credit the originator, but they know who they are ;)

In reply to Graham Robinson

Re: slasharguments: Either lose all my files or just my pictures

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Slasharguments are by far the preferred method. The other one is just to help a bit on bad servers, see the FAQ on slasharguments for info about fixing IIS so slasharguments works.
In reply to Martin Dougiamas

Re: slasharguments: Either lose all my files or just my pictures

by Graham Robinson -
Brilliant, thank you!

If only I knew I had to write slasharguements into my post to find out the answer blush

In reply to Graham Robinson

Re: slasharguments: Either lose all my files or just my pictures

by Graham Robinson -
Actually that didn't work.

I'm on IIS5 so went into the meta editor and changed both to true (like the microsoft support thing says) and they still don't work sad
In reply to Graham Robinson

Re: slasharguments: Either lose all my files or just my pictures

by Zbigniew Fiedorowicz -
In reply to Zbigniew Fiedorowicz

Re: slasharguments: Either lose all my files or just my pictures

by Graham Robinson -
That is EXACTLY the post that I was looking for. Thank you VERY much for finding it out. I like CAPITAL letters!

Graham
In reply to Graham Robinson

Re: slasharguments: Either lose all my files or just my pictures

by Skip Marshall -
I'm curious if anyone has been able to get AICC formatted content to work. We have SCORM content working, but AICC content that pulls material from an outside vedor's server just returns the following message:
"Sorry, the requested file could not be found"

We used isapi rewrite to get SCORM working, but we still aren't having any luck with outside vendors. Any suggestions would be greatly appreciated.

We are using Win 2003 Server with IIS 6.0 and PHP 5.0.4 as our platform. I've included a screenshot below using our test student.


Attachment screenshot.gif