Moodle course images issue

Moodle course images issue

by steve haviland -
Number of replies: 3

Hello all,

I am very new to moodle, and wanted to see what an installation looked like on my test server with some content in place.

First, I installed Moodle 1.5.3 successfully.  Next, I went to the moodle exchange and I picked the CPT1 Computing course by David Berry. 

Once I figured out how to load the course into my implementation of moodle, I noticed something bizarre.

Any time an image is presented in the couse, the URL is wrong. 

As an example, there is a picture of the Windows logo in this specific course called windows.JPG.  When I look at the path for the file that moodle is trying to call, it is :  http://thedomain/moodle/file.php/4/windows.JPG

So I was trying to figure out why it dropped in file.php in the images URL.  So I went into file.php and I see.

    $relativepath = get_file_argument('file.php');

So I tried to look up the function get_file_argument() in the two files that are included into file.php.  I can't find it in either filelib.php or config.php.  I think I am on the right track, but dont know the software well enough to figure out exactly whats going on.

Average of ratings: -
In reply to steve haviland

Re: Moodle course images issue

by Dan Stowell -
The URL is not wrong! This is how Moodle lets browsers access files from the moodle data folder. "file.php" acts as a kind of "border guard", amking sure that people can only access the images (and other files) that they're authorised to access.
In reply to Dan Stowell

Re: Moodle course images issue

by steve haviland -
There is something wrong.  If file.php works in the way you describe, why is it not getting the proper path for the file?
In reply to steve haviland

Re: Moodle course images issue

by steve haviland -
The solution for this issue is that you must.. ABSOLUTELY MUST.. have the php_gd2.dll installed if your running on an IIS platform.  I also upgraded to moodle 1.6 and the latest versions for mysql and php.  However it was the extension addition of php_gd2.dll that made this work.