Installation help

 
 
Picture of Bob Robertson
admin/index.php 404 error?
 
Hey all. I've been tasked with setting up an easily-reproducible Moodle installation with IIS 5.1 under Windows XP (SP2). I've got PHP 4.4.4 installed, and a call to phpinfo() creates the expected page. I've got MySQL 5.0.24 installed, and that seems to be working properly from the client. Accessing a test database via a test PHP is working properly. GD isn't installed, but it's not necessary, so I'm letting that slide for now, until it's up and running. In fact, everything was going fairly smoothly, until I actually tried to install Moodle (1.6.5+, freshly downloaded today on 9/20/07).

This problem is reproducible: installation progresses smoothly through language selection, system check, data folder setup, and database user setup. When the installation moves onto moodle/admin/index.php, however, I get an Error 404 from IIS, and can't progress further. I've experimented a bit with this, and have found the following data: if I remove the provided admin/index.php and create a fresh one, I can access it. I can access a phpinfo() test script in the same directory. If I rename the provided admin/index.php and try to access the renamed file, I can't access it. If I comment out all the contents of the provided admin/index.php file, I can access it.

I've never heard of a web server simply refusing to send a document just because it didn't like the document contents. In my experience, they usually send a list of parse errors or somesuch. I've even tried downloading and extracting a fresh copy, to no avail.

Has anyone encountered something like this before? I'm out of ideas, and getting a little desperate.

Many Thanks,
Bob Robertson
 
Average of ratings: -
Picture of Bob Robertson
Re: admin/index.php 404 error?
 
Okay, I managed to get through the installation by the bizarre expedient of commenting everything in admin/index.php out, and then slowly uncommenting things in an effort to figure out what line things were dying on. By the time I got to the end, it was loading nicely. I think that it has something to do with editing the file, saving the changes, and then changing it back. I hope that it doesn't crop up again.

Now that I have Moodle installed and working after a fashion, I have three other problems to worry about. First, none of the images are displaying; this includes static images from the pix folder, not generated ones, so I know that something's up.

Second, accessing <server>/moodle/ isn't enough to get into the site; I have to explicitly access <server>/moodle/index.php. This is probably just an IIS configuration issue, and not much of a problem.

Third, I need to install the GD library and get PHP happy with it. I uncommented the appropriate line in php.ini, but PHP started yelling about how one module was compiled with API=<aNumber> and PHP was compilerd with API=<bNumber>. The numbers look suspiciously like timestamps, so I think that I need to recompile PHP with the right command line options. I'm not quite sure how to do that on a windows machine.

Advice on any of these problems would be greatly appreciated. Needless to say, I'll be researching answers to these. I just wanted to get a status report out as soon as possible.

Many Thanks,
Bob Robertson
 
Average of ratings: -
Picture of Matt Molloy
Re: admin/index.php 404 error?
 

Hi Bob,

Getting Windows IIS to deal with index.php pages is, like you said, just a configuration issue. IIS would normally have files like index.htm and index.html in a list that it recognises, and you manually go and add others. You could check out this site, about half way down the page it gives instructions.

As regards the images, that is probably just a case of toggling your slasharguments settings-whatever they are now, change them to the opposite: Administration -> Server -> HTTP

Sorry, but can't help with the php issue.

Matt

 
Average of ratings: -
Picture of Bob Robertson
Re: admin/index.php 404 error?
 
I toggled the slasharguments setting (under Administration => Configuration => Variables; I couldn't find a Server submenu), but to no avail. Images that should be available aren't being served. Trying to access the image file directly (i.e. going directly to moodle/images/a/r_go.gif) produces a 404 page as well. I'll be scouring the web for help on that, but any advice is definitely appreciated.

I also added index.php to the list of default documents, again to no avail. I went to Control Panel=>Administrative Tools=>Computer Management, then opened the Internet Information Services entry. I right-clicked on "Web Sites", selected Properties, the Documents tab, then clicked "Add" and provided "index.php" to the resulting dialog box. I then spread the change to all conflicting children. I have done this for both the "Web Sites" heading and its "Default Web Site" child. Did I do something wrong?

Many thanks as ever,
Bob Robertson
 
Average of ratings: -
Picture of Matt Molloy
Re: admin/index.php 404 error?
 

Hi Bob,

Not that experienced with IIS, so hopefully someone more familiar will row in. I'm just wondering, do you have to re-start your web server for the changes to take effect?

On the images front, if you cannot even browse to them using http, and you are certain that they exist on that filepath, is it possible that IIS does not have read priveleges on the folder?

Finally, what I've seen people do with problems similar to yours is to simply install a complete xampp package and stop IIS completely. This may be an option. Alternatively, it may be worth your while checking out the Windows based servers forum.

Matt

 
Average of ratings: -
Picture of Bob Robertson
Re: admin/index.php 404 error?
 
Finally got things working, after finding that filesystem permissions and server permissions are apparently two different animals (see below). There are a few more details to iron out, but the site at least looks and feels usable now. A very many thanks for your assistance, and I shall certainly investigate the Windows based servers forum for further assistance in getting the details right. Again, thanks so much for your help, it really made this possible.

-Bob
 
Average of ratings: -
Picture of Bob Robertson
Re: admin/index.php 404 error?
 
Okay, managed to get images working, and the index.php default page working. The solution was to set read permissions from within IIS, not through the directory structure. I went to Control Panel=>Administrative Tools=>Computer Management, then opened the Internet Information Services entry. From there, I expanded the "Default Web Site" entry, then right-clicked on the moodle folder. I then ticked the 'read' selection, applied it, overrode the children, and all was well.
 
Average of ratings: -