404 error when adding a Resource to a Course Topic

404 error when adding a Resource to a Course Topic

by Grahame Gerstenberg -
Number of replies: 7

I've waded through a lot of similar posts but can't find a solution that works for me - hence yet another "404 error" post!

Uploaded Moodle (1.9.4+) onto hosted website running Apache 2 and PHP4.4.8.  Installation via install.php went OK after minor issues with database name/access (resolved with hosting company tech support).

Moodle directory sits at:   /var/virtual/web/user/html/moodle

Moodledata directory sits at: /var/virtual/web/user/moodledata

Logged in as Administrator & started creating courses - uploaded course files from home server into directories under moodledata. I can link to a file via "Add a resource", but when I try to dsplay the file I get the 404 error.  I can display a directory OK.

Have checked permissions on moodle and moodledata directories. Moodledata is currently 777 (while I try to fix this problem).

I don't have access to host server so tried adding .htaccess file to Moodle directory with "AcceptPathInfo On". No change with 404 error.

I notice the PHP config for my website (host server) includes the line: "arg_separator.input  =  &" which makes me wonder if the server can't interpret the slashes Moodle uses in its path variables - but then I'm grasping at straws here and could be way off base.

So, before I log another call with the web host tech support people I thought I'd try my luck here. Any suggestions/ advice would be greatly appreciated smile

 

Average of ratings: -
In reply to Grahame Gerstenberg

Re: 404 error when adding a Resource to a Course Topic

by Albert Ramsbottom -
What permissions have you set on the actual files that you are trying to access?

Paul
In reply to Grahame Gerstenberg

Re: 404 error when adding a Resource to a Course Topic

by Edward Dudley -
I'm having the same problems but on a Windows server.

How could I check / set my permissions on the moodledata folder?
In reply to Edward Dudley

Re: 404 error when adding a Resource to a Course Topic

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Right click the folder, choose properties, then click on the security tab...
In reply to Jon Witts

Re: 404 error when adding a Resource to a Course Topic

by Edward Dudley -
Thanks.

The security tab has everything granted to EVERYONE.

Any other ideas what this problem could be?
In reply to Edward Dudley

Re: 404 error when adding a Resource to a Course Topic

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
You need to grant the IUSR<machine name> account read write access to the Moodle data folder.

Is there an entry for IUSR<machine name>?
In reply to Edward Dudley

Re: 404 error when adding a Resource to a Course Topic

by Edward Dudley -
Found the problem - the slash settings needed to be changed for my server.

Server > HTTP > Untick use slash arguments in case it helps anyone else!
In reply to Grahame Gerstenberg

Re: 404 error when adding a Resource to a Course Topic

by Richard Enison -
GG and other Moodle newbies reading this thread from now on,

No, the arg_separator has nothing to do with path variables. The default is & for both input and output, according to http://php.net/manual/en/ini.core.php, and that should be okay. Now that more than half a year has passed and you are no longer enrolled, hopefully ED's solution worked for you as it did for him.

RLE