Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9930

Redirect fails with open_basedir enabled

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.8
    • Fix Version/s: 3.0.9-RC1
    • Component/s: Other
    • Labels:
      None

      Description

      [phpBB Debug] PHP Notice: in file /includes/functions.php on line 2356: file_exists() [function.file-exists]: open_basedir restriction in effect. File(.) is not within the allowed path(s): (/:/usr/share/php/:/tmp/)
      [phpBB Debug] PHP Notice: in file /includes/functions.php on line 2361: file_exists() [function.file-exists]: open_basedir restriction in effect. File(.) is not within the allowed path(s): (/:/usr/share/php/:/tmp/)
      [phpBB Debug] PHP Notice: in file /includes/functions.php on line 2471: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)

      For Reference:
      https://www.phpbb.de/community/viewtopic.php?f=73&t=211426

      The problem is, "." is not valid as a directory. Adding a trailing slash for the file_exists-check solves it.

        Activity

        Hide
        A_Jelly_Doughnut A_Jelly_Doughnut added a comment -

        Sounds like it could be a duplicate of PHPBB3-9543, although the description at that bug leaves a bit to be desired. Chris?

        Show
        A_Jelly_Doughnut A_Jelly_Doughnut added a comment - Sounds like it could be a duplicate of PHPBB3-9543, although the description at that bug leaves a bit to be desired. Chris?
        Hide
        bantu Andreas Fischer added a comment -

        Don't like the patch. I think it's wiser to check whether there is a slash at the end of $pathinfo['dirname']. If it is not there, add it to $pathinfo['dirname'].

        Show
        bantu Andreas Fischer added a comment - Don't like the patch. I think it's wiser to check whether there is a slash at the end of $pathinfo ['dirname'] . If it is not there, add it to $pathinfo ['dirname'] .
        Hide
        nickvergessen Joas Schilling added a comment -

        As far as I can read it from http://php.net/manual/en/function.pathinfo.php pathinfo never ends with a / And the rest of the functions seems to intend that way:

        $url = str_replace($pathinfo['dirname'] . '/', '', $url);

        Show
        nickvergessen Joas Schilling added a comment - As far as I can read it from http://php.net/manual/en/function.pathinfo.php pathinfo never ends with a / And the rest of the functions seems to intend that way: $url = str_replace($pathinfo['dirname'] . '/', '', $url);

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development