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

phpBB3 does not work with spaces in PostgreSQL database passwords

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.2.10-RC1, 3.3.1-RC1
    • 3.2.9, 3.3.0
    • None
    • None
    • PHP 7.1.33, PostgreSQL 9.6 on CentOS 7.7

      Hi guys,

      On the latest phpBB3 (3.3.0 at the time of this writing), an error occurs if you try to use a set of database credentials for PostgreSQL that contain spaces.

      Could not connect to the database, see error message below. Errno 2: pg_connect(): Unable to connect to PostgreSQL server: missing "=" after "finally" in connection info string at [ROOT]/phpbb/db/driver/postgres.php line 98
      

      The above error occurs.

      A fix was suggested by <Marc> on #phpbb

      [15:40:07] <phpbb-discord> Posted on Discord by <Marc>: can you try changing one line in phpBB? [15:40:11] <phpbb-discord> Posted on Discord by <Marc>: https://github.com/phpbb/phpbb/blob/master/phpBB/phpbb/db/driver/postgres.php#L40[15:40:31] <phpbb-discord> Posted on Discord by <Marc>: change to: $connect_string .= "password='$sqlpassword' ";
      

      After implementing the suggested fix, I was able to successfully install phpBB3 with spaces in the PostgreSQL credentials with no issues.

      I browsed around the newly installed board and nothing seemed out of place or broken.

       

            mrgoldy mrgoldy
            zorlin zorlin [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: