[Tickets #10199] SQL DB as VFS causes exception

bugs at horde.org bugs at horde.org
Mon Jun 6 17:20:21 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10199
------------------------------------------------------------------------------
  Ticket             | 10199
  Created By         | thpo+horde at dotrc.de
  Summary            | SQL DB as VFS causes exception
  Queue              | Turba
  Version            | 3.0.3
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


thpo+horde at dotrc.de (2011-06-06 17:20) wrote:

My config:

$conf['documents']['params']['driverconfig'] = 'horde';
$conf['documents']['type'] = 'Sql';

When selecting an entry in the addressbook, I get the following error:

A fatal error has occurred
Could not instantiate PDO with DSN  
"pgsql:vfsroot=/srv/horde_vfs;host=pgsql.back;dbname=horde4".  
PDOException: SQLSTATE[08006] [7] invalid connection option "vfsroot"

1. Turba_View_Contact->html() /srv/horde4/turba/contact.php:113
2. Turba_Form_Contact->__construct() /srv/horde4/turba/lib/View/Contact.php:42
3. Horde_Core_Factory_Vfs->getConfig()  
/srv/horde4/turba/lib/Form/Contact.php:33
4. Horde_Core_Factory_Db->create()  
/usr/share/php/Horde/Core/Factory/Vfs.php:91
5. Horde_Core_Factory_Db->createDb()  
/usr/share/php/Horde/Core/Factory/Db.php:92
6. Horde_Db_Adapter_Base->__construct()  
/usr/share/php/Horde/Core/Factory/Db.php:155
7. Horde_Db_Adapter_Pdo_Pgsql->connect()  
/usr/share/php/Horde/Db/Adapter/Base.php:143
8. Horde_Db_Adapter_Pdo_Base->connect()  
/usr/share/php/Horde/Db/Adapter/Pdo/Pgsql.php:88

Details
The full error message is logged in Horde's log file, and is shown  
below only to administrators. Non-administrative users will not see  
error details.

Horde_Db_Exception Object
(
     [details] =>
     [message:protected] => Could not instantiate PDO with DSN  
"pgsql:vfsroot=/srv/horde_vfs;host=pgsql.back;dbname=horde4".   
PDOException: SQLSTATE[08006] [7] invalid connection option "vfsroot"
     [string:Exception:private] =>
     [code:protected] => 0
     [file:protected] => /usr/share/php/Horde/Db/Adapter/Pdo/Base.php
     [line:protected] => 46
     [trace:Exception:private] => Array
         (
             [0] => Array
                 (
                     [file] => /usr/share/php/Horde/Db/Adapter/Pdo/Pgsql.php
                     [line] => 88
                     [function] => connect
                     [class] => Horde_Db_Adapter_Pdo_Base
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

             [1] => Array
                 (
                     [file] => /usr/share/php/Horde/Db/Adapter/Base.php
                     [line] => 143
                     [function] => connect
                     [class] => Horde_Db_Adapter_Pdo_Pgsql
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

             [2] => Array
                 (
                     [file] => /usr/share/php/Horde/Core/Factory/Db.php
                     [line] => 155
                     [function] => __construct
                     [class] => Horde_Db_Adapter_Base
                     [type] => ->
                     [args] => Array
                         (
                             [0] => Array
                                 (
                                     [persistent] => 1
                                     [username] => horde
                                     [password] => :-)
                                     [protocol] => tcp
                                     [database] => horde4
                                     [charset] => utf-8
                                     [phptype] => pgsql
                                     [vfsroot] => /srv/horde_vfs
                                     [adapter] => pdo_pgsql
                                     [host] => pgsql.back
                                 )

                         )

                 )

             [3] => Array
                 (
                     [file] => /usr/share/php/Horde/Core/Factory/Db.php
                     [line] => 92
                     [function] => createDb
                     [class] => Horde_Core_Factory_Db
                     [type] => ->
                     [args] => Array
                         (
                             [0] => Array
                                 (
                                     [persistent] => 1
                                     [username] => horde
                                     [password] => :-)
                                     [hostspec] => pgsql.back
                                     [protocol] => tcp
                                     [database] => horde4
                                     [charset] => utf-8
                                     [phptype] => pgsql
                                     [vfsroot] => /srv/horde_vfs
                                 )

                         )

                 )

             [4] => Array
                 (
                     [file] => /usr/share/php/Horde/Core/Factory/Vfs.php
                     [line] => 91
                     [function] => create
                     [class] => Horde_Core_Factory_Db
                     [type] => ->
                     [args] => Array
                         (
                             [0] => horde
                             [1] => vfs
                         )

                 )

             [5] => Array
                 (
                     [file] => /srv/horde4/turba/lib/Form/Contact.php
                     [line] => 33
                     [function] => getConfig
                     [class] => Horde_Core_Factory_Vfs
                     [type] => ->
                     [args] => Array
                         (
                             [0] => documents
                         )

                 )

             [6] => Array
                 (
                     [file] => /srv/horde4/turba/lib/View/Contact.php
                     [line] => 42
                     [function] => __construct
                     [class] => Turba_Form_Contact
                     [type] => ->
                     [args] => Array
                         (
                             __ Private data removed __
                         )

                 )

             [7] => Array
                 (                    [file] => /srv/horde4/turba/contact.php
                     [line] => 113
                     [function] => html
                     [class] => Turba_View_Contact
                     [type] => ->
                     [args] => Array
                         (
                         )

                 )

         )

     [previous:Exception:private] =>
)

In my opinion the bug could be fixed like this:
# diff -u /usr/share/php/Horde/Core/Factory/Vfs.php*
--- /usr/share/php/Horde/Core/Factory/Vfs.php   2011-06-06  
19:19:20.780334492 +0200
+++ /usr/share/php/Horde/Core/Factory/Vfs.php_orig      2011-06-02  
12:26:44.559126032 +0200
@@ -88,7 +88,7 @@
              } else {
                  $vfs['params']['db'] = $this->_injector
                      ->getInstance('Horde_Core_Factory_Db')
-                    ->create('horde', 'sql');
+                    ->create('horde', 'vfs');
              }
              break;
          }







More information about the bugs mailing list