Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-44172

moodle/lib/htaccess example file is outdated and should be removed

    XMLWordPrintable

    Details

      Description

      Recently I installed Moodle 2.6.1+ on my cheap hosting server, and suffered "menus not expanding" problem. This issue has been reported zillion times, there is even a FAQ on it( http://docs.moodle.org/25/en/Blocks_FAQ#My_Administration_block_links_don.27t_expand.21), but for my case any remedy FAQ gave(turning off slash, using online YUI, purging caches, etc) didn't work.

      I investigated this problem a bit, and found:

      1) Various exotic problem such as "menus not expanding" or "M.util.load_flowplayer is not a function" has a common cause – under certain circumstances, moodle/lib/javascript.php doesn't work correctly and gives a 500 error. For example, my Google Chrome console shows:

      GET http://www.yourhost.com/moodle/lib/javascript.php/-1/lib/javascript-static.js 500 (Internal Server Error)

      Then javascript-static.js is not loaded, so all JS stuff don't work. That's the problem.

      2) First I doubt on cache, but turned out it's not. My server log shows me something like:

      [Fri Feb 14 10:00:00 2014] [alert] [client xxx.xxx.xxx.xxx] /path/to/moodle/lib/htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration, referer: http://www.yourhost.com/moodle/

      Well, I'm not sure what it really means (server-side PHP malconfiguration?), but anyway renaming moodle/lib/htaccess to something like htaccess.dist fixed all problem I experienced.

      Seems this moodle/lib/htaccess is merely an example file, how about changing its name or location?

        Attachments

          Activity

            People

            Assignee:
            poltawski Dan Poltawski
            Reporter:
            mhatta Masayuki Hatta
            Peer reviewer:
            Ankit Agarwal
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Eloy Lafuente (stronk7)
            Participants:
            Component watchers:
            Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/May/17