Moodle version : Moodle 2.3.1+ (Build: 20120831)
PHP version : tested with 5.3.16 and 5.4.6. (with the same issue).
Website hosted by OVH.
Our Moodle web site is correctly working, except in one specific situation.
When trying to download a zip file from a course, we get the following display :
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /home/username/www/moodle/lib/dml/moodle_database.php on line 27
Warning: require_once(__DIR__/database_column_info.php) [function.require-once]: failed to open stream: No such file or directory in /home/username/www/moodle/lib/dml/moodle_database.php on line 27
Fatal error: require_once() [function.require]: Failed opening required '__DIR__/database_column_info.php' (include_path='/home/username/www/moodle/lib/zend:/home/username/www/moodle/lib/pear:.:/usr/local/lib/php') in /home/username/www/moodle/lib/dml/moodle_database.php on line 27
Everything is fine for other kinds of files (pdf and many others).
If we change the .zip extension to something else, as .abc, then it is possible to download the file...
Would you have an idea about how to fix this ? Thanks !
Additional info : with OVH (hosting our web site), the PHP version is selected in the .access file located at the root of the moodle folder.
Using PHP 5.3 or 5.4, the constant "__DIR__" should be defined as this is explained in : http://php.net/manual/en/language.constants.predefined.php
However, the displayed error mgs says that this constant is undefined. I don't understand how this may happen, and why this only happens when trying to download a zip file.