Problems with file.php

Problems with file.php

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

評比平均分數: -
In reply to 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.)
In reply to 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.
In reply to 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