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

DB connection error when $dbhost is an IPv6 address

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.7-PL1
    • 3.0.8-RC1
    • None
    • Linux 2.6.32-gentoo-r7, PHP 5.2.13-pl0-gentoo, PostgreSQL 8.4.4, Apache 2.2.15

    Description

      IPv6 addresses (::1 for example) containing ':' characters, that interpreting by include/db/postgres.php as host:port separator.
      There's a possible patch that fixes it:

      postgres.php

      --- postgres.php.orig   2010-06-08 18:50:44.000000000 +0400
      +++ postgres.php        2010-06-08 18:50:38.000000000 +0400
      @@ -46,7 +46,7 @@
       
                      if ($sqlserver)
                      {
      -                       if (strpos($sqlserver, ':') !== false)
      +                       if ($port === false && substr_count($sqlserver, ':') === 1)
                              {
                                      list($sqlserver, $port) = explode(':', $sqlserver);
                              }
      

      Attachments

        Activity

          People

            bantu Andreas Fischer [X] (Inactive)
            tolich tolich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: