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

relative and absolute path in require_once

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: None
    • Component/s: Backup
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_15_STABLE

      Description

      I have one site where backup/restore did not work. However, it is only on one site, I have tested the same example on some others where I have access and the bug did not occur. The problematic site runs under Linux, Mysql 4.1.10, php 5.0.4, safe mode off.

      The bug does not occur if I replace relative path in require_once for absolute path:

      restore: moodle/backup/bb/restore_bb.php, line 6:

      require_once('xsl_emulate_xslt.inc');

      changed to

      require_once($CFG->dirroot.'/backup/bb/xsl_emulate_xslt.inc');

      backup/delete: moodle/mod/quiz/lib.php, line 290:

      require_once(locallib.php);

      changed to:

      require_once($CFG->dirroot./mod/quiz/locallib.php);

      Everything other works as expected, but it might be that I have not yet checked all moodle features and that the issue will come again. I suspect that it may be a bug of php, but I cannot confirm it.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            dougiamas Martin Dougiamas added a comment -

            From Petr Skoda (skodak at centrum.cz) Wednesday, 8 March 2006, 07:45 AM:

            I have seen something similar. Fixed in both STABLE and HEAD, closign now.

            Thanks for the report!

            Show
            dougiamas Martin Dougiamas added a comment - From Petr Skoda (skodak at centrum.cz) Wednesday, 8 March 2006, 07:45 AM: I have seen something similar. Fixed in both STABLE and HEAD, closign now. Thanks for the report!
            Hide
            mblake Michael Blake added a comment -

            assign to a valid user

            Show
            mblake Michael Blake added a comment - assign to a valid user

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: