Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-8359

<!-- INCLUDEPHP test.php --> used relative without phpbb-root-path and error-message is wrongi

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.6
    • 3.0.5
    • Other
    • None
    • PHP Environment:
      Database:

      Putting code like

      <!-- INCLUDEPHP test.php -->

      into the overall_header.html will include that file from relative path.
      If through some MODs you are in a subfolder, it will try to load subfolder/test.php.

      When Debug is enabled this is no problem, but if it's disabled you get:

      Warning: include(test.php) [function.include]: failed to open stream: No such file or directory in XYZ\htdocs\phpBB3\cache\tpl_prosilver_overall_header.html.php on line 92

      Warning: include() [function.include]: Failed opening 'test.php' for inclusion (include_path='.;XYZ\php\pear\') in XYZ\htdocs\phpBB3\cache\tpl_prosilver_overall_header.html.php on line 92

      So there are two things "wrong":
      1. the message should be displayed when debug is enabled and be hidden when it is disabled.
      2. there should be a way given to say whether the file is in root-path or in the relative directory.

      When do you remove php from the template, it's a pain

            nickvergessen Joas Schilling
            nickvergessen Joas Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: