Problems with file.php

Problems with file.php

by Angel AG -
Number of replies: 3

Hi, maybe someone can help me out...

I have a version of moodle installed and fuctioning (www.iberenglish.com). I don't have any problem with the installation of v1.5 (www.iberenglish.com/moodle) except in the resource "display a directory". When I click on one of the files shown, I get the message: 

Sorry, the requested file could not be found.

The link is:

http://www.iberenglish.com/moodle/file.php/1/download/Colinas_azules.jpg

However, if I put: http://www.iberenglish.com/moodle/file.php?file=/1/download/Colinas_azules.jpg , it displays the file. 

Perhaps it is a problem with the permissions, but I have reviewed the new installation and everything is correct.

I am putting my site's phpinfo() here in case anyone thinks the problem is there.

I would appreciate any suggestions.

Angel

Average of ratings: -
In reply to Angel AG

Re: Problems with file.php

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 Angel,

You could try changing your slasharguments setting to file.php?file=/pic.jpg in Administration >> Configuration >> Variables. (Please check the file not found FAQ for more details.)
In reply to Angel AG

Re: Problems with file.php

by Keith Heinrich -
Go back into your site settings and change the slasharguments. That should sort out your problem.
In reply to Keith Heinrich

Re: Problems with file.php

by Angel AG -

Thank you for your suggestions. You were right, changing the slasharguments worked.

But, in the first installation in http://www.iberenglish.com/elearning where the version 1.5 is installed, the parameter for slashargument is configured as file.php/pic.jpg.

The file .htaccess does not exist in either of the directories because the hosting has it disabled.

What I don't understand is why the two installations work in different ways when "AcceptPathInfo" is "on" in the Apache configuration (according to my hosting provider)

Anyway, what I would like to know is this bit of information. Why one installation works but the other doesn't.

Thanks in advance for any information you can share.

Have a good day!

Angel