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

Postgres search_path inproperly set

    XMLWordPrintable

    Details

      Description

      In an attempt to move the phpBB database to a schema outside of public, I was having significant problems getting it to work. I ended up setting the default search_path on the user account to the new schema to work around the issue, but upon reviewing the logs for Postgres found the following messages:

      Jul 12 20:58:22 [postgres] [9-1] 2021-07-12 20:58:22.011 MDT [794333] ERROR: unterminated quoted identifier at or near ""schema" at character 20
      Jul 12 20:58:22 [postgres] [9-2] 2021-07-12 20:58:22.011 MDT [794333] STATEMENT: SET search_path TO "schema

      When reviewing the database driver (as found here: https://github.com/phpbb/phpbb/blob/release-3.3.4/phpBB/phpbb/db/driver/postgres.php) I discovered that on line 107 there is no closing quote around the schema name. I edited the file to change that on my install and discovered that it resolved the problem. The new line is:

      @pg_query($this->db_connect_id, 'SET search_path TO "' . $schema . '"');

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            mbisme mbisme
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: