<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>SQL DB as VFS causes exception</title> 
  <pubDate>Fri, 10 Apr 2026 16:48:41 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/10199</link> 
  <atom:link rel="self" type="application/rss+xml" title="SQL DB as VFS causes exception" href="https://bugs.horde.org/ticket/10199/rss" /> 
  <description>SQL DB as VFS causes exception</description> 
 
   
   
  <item> 
   <title>My config:

$conf[&#039;documents&#039;][&#039;params&#039;][&#039;driverconfig&#039;] =</title> 
   <description>My config:

$conf[&#039;documents&#039;][&#039;params&#039;][&#039;driverconfig&#039;] = &#039;horde&#039;;
$conf[&#039;documents&#039;][&#039;type&#039;] = &#039;Sql&#039;;

When selecting an entry in the addressbook, I get the following error:

A fatal error has occurred
Could not instantiate PDO with DSN &quot;pgsql:vfsroot=/srv/horde_vfs;host=pgsql.back;dbname=horde4&quot;. PDOException: SQLSTATE[08006] [7] invalid connection option &quot;vfsroot&quot;

1. Turba_View_Contact-&gt;html() /srv/horde4/turba/contact.php:113
2. Turba_Form_Contact-&gt;__construct() /srv/horde4/turba/lib/View/Contact.php:42
3. Horde_Core_Factory_Vfs-&gt;getConfig() /srv/horde4/turba/lib/Form/Contact.php:33
4. Horde_Core_Factory_Db-&gt;create() /usr/share/php/Horde/Core/Factory/Vfs.php:91
5. Horde_Core_Factory_Db-&gt;createDb() /usr/share/php/Horde/Core/Factory/Db.php:92
6. Horde_Db_Adapter_Base-&gt;__construct() /usr/share/php/Horde/Core/Factory/Db.php:155
7. Horde_Db_Adapter_Pdo_Pgsql-&gt;connect() /usr/share/php/Horde/Db/Adapter/Base.php:143
8. Horde_Db_Adapter_Pdo_Base-&gt;connect() /usr/share/php/Horde/Db/Adapter/Pdo/Pgsql.php:88

Details
The full error message is logged in Horde&#039;s log file, and is shown below only to administrators. Non-administrative users will not see error details.

Horde_Db_Exception Object
(
    [details] =&gt; 
    [message:protected] =&gt; Could not instantiate PDO with DSN &quot;pgsql:vfsroot=/srv/horde_vfs;host=pgsql.back;dbname=horde4&quot;.  PDOException: SQLSTATE[08006] [7] invalid connection option &quot;vfsroot&quot;
    [string:Exception:private] =&gt; 
    [code:protected] =&gt; 0
    [file:protected] =&gt; /usr/share/php/Horde/Db/Adapter/Pdo/Base.php
    [line:protected] =&gt; 46
    [trace:Exception:private] =&gt; Array
        (
            [0] =&gt; Array
                (
                    [file] =&gt; /usr/share/php/Horde/Db/Adapter/Pdo/Pgsql.php
                    [line] =&gt; 88
                    [function] =&gt; connect
                    [class] =&gt; Horde_Db_Adapter_Pdo_Base
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                        )

                )

            [1] =&gt; Array
                (
                    [file] =&gt; /usr/share/php/Horde/Db/Adapter/Base.php
                    [line] =&gt; 143
                    [function] =&gt; connect
                    [class] =&gt; Horde_Db_Adapter_Pdo_Pgsql
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                        )

                )

            [2] =&gt; Array
                (
                    [file] =&gt; /usr/share/php/Horde/Core/Factory/Db.php
                    [line] =&gt; 155
                    [function] =&gt; __construct
                    [class] =&gt; Horde_Db_Adapter_Base
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; Array
                                (
                                    [persistent] =&gt; 1
                                    [username] =&gt; horde
                                    [password] =&gt; :-)
                                    [protocol] =&gt; tcp
                                    [database] =&gt; horde4
                                    [charset] =&gt; utf-8
                                    [phptype] =&gt; pgsql
                                    [vfsroot] =&gt; /srv/horde_vfs
                                    [adapter] =&gt; pdo_pgsql
                                    [host] =&gt; pgsql.back
                                )

                        )

                )

            [3] =&gt; Array
                (
                    [file] =&gt; /usr/share/php/Horde/Core/Factory/Db.php
                    [line] =&gt; 92
                    [function] =&gt; createDb
                    [class] =&gt; Horde_Core_Factory_Db
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; Array
                                (
                                    [persistent] =&gt; 1
                                    [username] =&gt; horde
                                    [password] =&gt; :-)
                                    [hostspec] =&gt; pgsql.back
                                    [protocol] =&gt; tcp
                                    [database] =&gt; horde4
                                    [charset] =&gt; utf-8
                                    [phptype] =&gt; pgsql
                                    [vfsroot] =&gt; /srv/horde_vfs
                                )

                        )

                )

            [4] =&gt; Array
                (
                    [file] =&gt; /usr/share/php/Horde/Core/Factory/Vfs.php
                    [line] =&gt; 91
                    [function] =&gt; create
                    [class] =&gt; Horde_Core_Factory_Db
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; horde
                            [1] =&gt; vfs
                        )

                )

            [5] =&gt; Array
                (
                    [file] =&gt; /srv/horde4/turba/lib/Form/Contact.php
                    [line] =&gt; 33
                    [function] =&gt; getConfig
                    [class] =&gt; Horde_Core_Factory_Vfs
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            [0] =&gt; documents
                        )

                )

            [6] =&gt; Array
                (
                    [file] =&gt; /srv/horde4/turba/lib/View/Contact.php
                    [line] =&gt; 42
                    [function] =&gt; __construct
                    [class] =&gt; Turba_Form_Contact
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                            __ Private data removed __
                        )

                )

            [7] =&gt; Array
                (                    [file] =&gt; /srv/horde4/turba/contact.php
                    [line] =&gt; 113
                    [function] =&gt; html
                    [class] =&gt; Turba_View_Contact
                    [type] =&gt; -&gt;
                    [args] =&gt; Array
                        (
                        )

                )

        )

    [previous:Exception:private] =&gt; 
)

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[&#039;params&#039;][&#039;db&#039;] = $this-&gt;_injector
                     -&gt;getInstance(&#039;Horde_Core_Factory_Db&#039;)
-                    -&gt;create(&#039;horde&#039;, &#039;sql&#039;);
+                    -&gt;create(&#039;horde&#039;, &#039;vfs&#039;);
             }
             break;
         }
</description> 
   <pubDate>Mon, 06 Jun 2011 17:20:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10199#t65427</link> 
  </item> 
   
  <item> 
   <title>&gt; $conf[&#039;documents&#039;][&#039;params&#039;][&#039;driverconfig&#039;] = &#039;horde&#039;;
&gt;</title> 
   <description>&gt; $conf[&#039;documents&#039;][&#039;params&#039;][&#039;driverconfig&#039;] = &#039;horde&#039;;
&gt; $conf[&#039;documents&#039;][&#039;type&#039;] = &#039;Sql&#039;;

This is not a valid configuration. How did you create it?</description> 
   <pubDate>Wed, 29 Jun 2011 15:50:28 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10199#t65987</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; $conf[&#039;documents&#039;][&#039;params&#039;][&#039;driverconfig&#039;] = &#039;horde&#039;;
</title> 
   <description>&gt;&gt; $conf[&#039;documents&#039;][&#039;params&#039;][&#039;driverconfig&#039;] = &#039;horde&#039;;
&gt;&gt; $conf[&#039;documents&#039;][&#039;type&#039;] = &#039;Sql&#039;;
&gt;
&gt; This is not a valid configuration. How did you create it?

Here is my full turba configuration, which was created using the configuration page of horde. In the relevant &quot;Virtual File Storage&quot; stanza I selected &quot;SQL database&quot; and &quot;Horde defaults&quot;. I hope this clears it up a bit. Sorry for prefiltering the information and misleading you in fixing the bug.
Please note, that in my bug report I also made a suggestion at the bottom of it, how I managed to fix this bug for me.

horde:/srv/horde4/turba# cat config/conf.php
&lt;?php
/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
// $Id: 09b0c45b46e87aabed0f94ca32516030865b379b $
$conf[&#039;menu&#039;][&#039;import_export&#039;] = true;
$conf[&#039;menu&#039;][&#039;apps&#039;] = array();
$conf[&#039;shares&#039;][&#039;source&#039;] = &#039;localsql&#039;;
$conf[&#039;comments&#039;][&#039;allow&#039;] = true;
$conf[&#039;documents&#039;][&#039;params&#039;][&#039;driverconfig&#039;] = &#039;horde&#039;;
$conf[&#039;documents&#039;][&#039;type&#039;] = &#039;Sql&#039;;
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */

Kind regards,
 Thomas</description> 
   <pubDate>Thu, 30 Jun 2011 07:23:21 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10199#t66016</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

[jan] Fix ge</title> 
   <description>Changes have been made in Git for this ticket:

[jan] Fix generating database DSN for VFS if the global VFS configuration doesn&#039;t use SQL (Bug #10199).

 2 files changed, 5 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/442c1bf2b4a6cf7dd0121642fc625e2dddcf4fd4</description> 
   <pubDate>Thu, 30 Jun 2011 10:39:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/10199#t66031</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
