Problems with file.php

Problems with file.php

- Angel AG の投稿
返信数: 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

Angel AG への返信

Re: Problems with file.php

- Helen Foster の投稿
画像 Core developers 画像 Documentation writers 画像 Moodle HQ 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers 画像 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.)
Angel AG への返信

Re: Problems with file.php

- Keith Heinrich の投稿
Go back into your site settings and change the slasharguments. That should sort out your problem.
Keith Heinrich への返信

Re: Problems with file.php

- 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