Installed Moodle, homepage does not load, only some pages work

Installed Moodle, homepage does not load, only some pages work

av IMM IMM -
Antall svar: 5

Hi,

I installed a completely new instance of Moodle and when accessing (URL)/moodle, I get a list of files in the folder public_html/moodle ("Index of /moodle") instead of the moodle homepage, however, launching a specific page such as (URL)/moodle/my/ [my home] or (URL)/moodle/install.php (the latter being how I installed it) works with issues. For example if from "my home" I go to Home it again shows me "Index of /moodle" and although I can add a course, if I try deleting it or even clicking on the course in the Courses menu I'm stuck with a blank screen with (in the latter example) a URL like (URL)/moodle/course/view.php?id=2, refreshing does not do the action, deletes do not happen. I do not know much php but it looks like some sort of issue with url rewriting? Any help on how to resolve this would be much appreciated. My server details are as follows:

Moodle version: Moodle 2.3.3+

PHP Version: 5.3.18

MySQL version: 5.1.65

The web server used is Apache, browser tested is Chrome.

The php info is attached with password need@help without the @.

Gjennomsnittlig vurdering: -
Som svar til IMM IMM

Re: Installed Moodle, homepage does not load, only some pages work

av IMM IMM -

Just another thing, the installer was all green for the prerequisites, not a single warning.

Som svar til IMM IMM

Re: Installed Moodle, homepage does not load, only some pages work

av Howard Miller -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers

Well, it's nothing to do with Moodle - it's your apache configuration almost certainly. Somewhere in your httpd.conf you should have a line something like...

<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>

I'm guessing that it's either wrong or - more likely - in the wrong place. How did you set up Apache?

EDIT:Also, check the value of $CFG->wwwroot in your config.php, make sure it's correct (no slash at the end in particular).

Som svar til Howard Miller

Re: Installed Moodle, homepage does not load, only some pages work

av IMM IMM -

I do not seem to have access to httpd.conf via my web host, trying to add the handler manually via cpanel (Handler: application/x-httpd-php and extension: .php) did not work, should the handler have been specified as x-httpd-php without "application/"? The $CFG->wwwroot variable is also correctly set, the url is correct and no slash at the end is present. Can the httpd.conf file be created separately such as in the same folder as moodle? For now I've used softaculous to install moodle separately and that install is working (had to change the permissions for the db user it created though, anyone else trying using this please watch out) but left the older setup separate to try and fix this issue should it crop up later.

Som svar til IMM IMM

Re: Installed Moodle, homepage does not load, only some pages work

av Howard Miller -
Bilde av Core developers Bilde av Documentation writers Bilde av Particularly helpful Moodlers Bilde av Peer reviewers Bilde av Plugin developers

Have you asked your host's support people? It's almost certainly a configuration problem on their end of things.