-
Bug
-
Resolution: Invalid
-
Major
-
None
-
3.3.4
-
phpBB 3.3.4, PHP 7.4.19, Postgres 13.2
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 . '"');