Intermittent error: Command line scripts must define CLI_SCRIPT before requiring config.php

Intermittent error: Command line scripts must define CLI_SCRIPT before requiring config.php

by Joshua Todd Cowper -
Number of replies: 0
Picture of Core developers Picture of Testers

Running the latest version of Moodle (3.2.1) on Apache/Debian:

Our Moodle site displays this error instead of the page, randomly and intermittently

Command line scripts must define CLI_SCRIPT before requiring config.php


I've read through forums and seen previous suggestions but these seem to be aimed towards when a specific page is causing the issue. This error appears, randomly, on any given page. The page loads successfully more often than it errors, but it's still quite annoying.


Can anyone provide any advice, or perhaps what debugging settings I need on in Moodle/my server to see what PHP files/lines of code are calling the error?

Average of ratings: -