<?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>Horde authentification: SQL Custom</title> 
  <pubDate>Fri, 10 Apr 2026 13:16:56 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9879</link> 
  <atom:link rel="self" type="application/rss+xml" title="Horde authentification: SQL Custom" href="https://bugs.horde.org/ticket/9879/rss" /> 
  <description>Horde authentification: SQL Custom</description> 
 
   
   
  <item> 
   <title>Dear Dev Team,

Switching the Horde authentication from IM</title> 
   <description>Dear Dev Team,

Switching the Horde authentication from IMAP to SQL with custom settings, the PDO instantation crashed. The Pdo seems to have problems with the connection parameters, maybe some kind of mis-parsing...

Details:
Horde H4.
Horde SQL Auth -&gt; Custom -&gt; pgsql (PostgreSQL 9.0, PHP Version 5.3.3-7)

Error Message:
Could not instantiate PDO with DSN &quot;pgsql:driverconfig=custom;table=my_user_table;username_field=_my_user_name;password_field=_my_user_password;host=localhost;dbname=other_than_horde_db&quot;. PDOException: SQLSTATE[08006] [7] ungültige Verbindungsoption(means: invalid connection option) »driverconfig«

callstack:
 1. Horde_Registry::appInit() /usr/share/php/www/horde/admin/config/config.php:12
 2. Horde_Registry-&gt;__construct() /usr/share/php/Horde/Registry.php:231
 3. Horde_Injector-&gt;getInstance() /usr/share/php/Horde/Registry.php:440
 4. Horde_Injector-&gt;createInstance() /usr/share/php/Horde/Injector.php:248
 5. Horde_Injector_Binder_Factory-&gt;create() /usr/share/php/Horde/Injector.php:213
 6. Horde_Core_Factory_Notification-&gt;create() /usr/share/php/Horde/Injector/Binder/Factory.php:111
 7. Horde_Registry-&gt;listApps() /usr/share/php/Horde/Core/Factory/Notification.php:20
 8. Horde_Registry-&gt;hasPermission() /usr/share/php/Horde/Registry.php:781
 9. Horde_Registry-&gt;isAuthenticated() /usr/share/php/Horde/Registry.php:1399
10. Horde_Registry-&gt;checkExistingAuth() /usr/share/php/Horde/Registry.php:1823
11. Horde_Core_Factory_Auth-&gt;create() /usr/share/php/Horde/Registry.php:2191
12. Horde_Core_Factory_Auth-&gt;_create() /usr/share/php/Horde/Core/Factory/Auth.php:61
13. Horde_Core_Factory_Db-&gt;create() /usr/share/php/Horde/Core/Factory/Auth.php:183
14. Horde_Core_Factory_Db-&gt;createDb() /usr/share/php/Horde/Core/Factory/Db.php:88
15. Horde_Db_Adapter_Base-&gt;__construct() /usr/share/php/Horde/Core/Factory/Db.php:151
16. Horde_Db_Adapter_Pdo_Pgsql-&gt;connect() /usr/share/php/Horde/Db/Adapter/Base.php:143
17. Horde_Db_Adapter_Pdo_Base-&gt;connect() /usr/share/php/Horde/Db/Adapter/Pdo/Pgsql.php:88



</description> 
   <pubDate>Mon, 11 Apr 2011 19:29:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63506</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

sanitize the</title> 
   <description>Changes have been made in Git for this ticket:

sanitize the parameters used to instantiate a Horde_Db_Adapter
Possibly fixes Bug: 9879

 1 files changed, 14 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/e457307312c03f50d0b2dc9f2c13bf22673c4ca3</description> 
   <pubDate>Wed, 13 Apr 2011 05:06:35 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63598</link> 
  </item> 
   
  <item> 
   <title>Does this fix things?</title> 
   <description>Does this fix things?</description> 
   <pubDate>Wed, 13 Apr 2011 05:07:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63599</link> 
  </item> 
   
  <item> 
   <title>&gt; Does this fix things?

No, it&#039;s still the same DSN error</title> 
   <description>&gt; Does this fix things?

No, it&#039;s still the same DSN error.

I only copied your modified file from the git repo into the horde installation of the pear package.

do I need other files to update?

Thanks, Torben</description> 
   <pubDate>Wed, 13 Apr 2011 06:17:04 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63606</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; Does this fix things?
&gt;
&gt; No, it&#039;s still the same DSN e</title> 
   <description>&gt;&gt; Does this fix things?
&gt;
&gt; No, it&#039;s still the same DSN error.
&gt;
&gt; I only copied your modified file from the git repo into the horde 
&gt; installation of the pear package.
&gt;
&gt; do I need other files to update?
&gt;
&gt; Thanks, Torben

Maybe Horde creates the config file in a wrong way?

my auth part of horde/config/conf.php is:

$conf[&#039;auth&#039;][&#039;admins&#039;] = array(&#039;Administrator&#039;, &#039;user@domain.tld&#039;);
$conf[&#039;auth&#039;][&#039;checkip&#039;] = true;
$conf[&#039;auth&#039;][&#039;checkbrowser&#039;] = true;
$conf[&#039;auth&#039;][&#039;alternate_login&#039;] = false;
$conf[&#039;auth&#039;][&#039;redirect_on_logout&#039;] = false;
$conf[&#039;auth&#039;][&#039;list_users&#039;] = &#039;input&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;persistent&#039;] = true;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;username&#039;] = &#039;db_user&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;password&#039;] = &#039;db_pass&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;hostspec&#039;] = &#039;localhost&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;protocol&#039;] = &#039;tcp&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;database&#039;] = &#039;non_horde_auth_db&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;charset&#039;] = &#039;utf-8&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;phptype&#039;] = &#039;pgsql&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;driverconfig&#039;] = &#039;custom&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;table&#039;] = &#039;auth_table;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;username_field&#039;] = &#039;user_field&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;password_field&#039;] = &#039;pw_field&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;encryption&#039;] = &#039;crypt-md5&#039;;
$conf[&#039;auth&#039;][&#039;params&#039;][&#039;show_encryption&#039;] = false;
$conf[&#039;auth&#039;][&#039;driver&#039;] = &#039;sql&#039;;

</description> 
   <pubDate>Wed, 13 Apr 2011 06:24:06 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63607</link> 
  </item> 
   
  <item> 
   <title>
&gt; Maybe Horde creates the config file in a wrong way?

N</title> 
   <description>
&gt; Maybe Horde creates the config file in a wrong way?

No. The config is fine. I know what&#039;s wrong, though I won&#039;t have access to my source tree until later tonight.</description> 
   <pubDate>Wed, 13 Apr 2011 13:45:05 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63626</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git for this ticket:

Bug: 9879 - </title> 
   <description>Changes have been made in Git for this ticket:

Bug: 9879 - More fields to sanitize for custom sql auth drivers

 1 files changed, 6 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/6b93dd448cd446adefac3bd21875af5f084eb734</description> 
   <pubDate>Thu, 14 Apr 2011 02:53:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63694</link> 
  </item> 
   
  <item> 
   <title>Did you generate your config through the interface? It seems</title> 
   <description>Did you generate your config through the interface? It seems to contain fields that are generated when using the cyrus sql driver, not the custom sql driver as you said you used.

Regardless, I reverted the previous commit and committed a more appropriate fix. Should be fixed now.</description> 
   <pubDate>Thu, 14 Apr 2011 02:56:55 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63695</link> 
  </item> 
   
  <item> 
   <title>&gt; Did you generate your config through the interface? It see</title> 
   <description>&gt; Did you generate your config through the interface? It seems to 
&gt; contain fields that are generated when using the cyrus sql driver, 
&gt; not the custom sql driver as you said you used.
&gt;
&gt; Regardless, I reverted the previous commit and committed a more 
&gt; appropriate fix. Should be fixed now.

I genereted it througbh the web interface. I selected custom and in the sub-seletion PostgreSQL.
&#039;Ill test it.

What files are affected?

thanks anyway!

Torben</description> 
   <pubDate>Thu, 14 Apr 2011 06:03:05 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63705</link> 
  </item> 
   
  <item> 
   <title>Hi Michael,

I copied this files into my pear installation</title> 
   <description>Hi Michael,

I copied this files into my pear installation:
- framework/Auth/lib/Horde/Auth/Cyrsql.php
- framework/Auth/lib/Horde/Auth/Imap.php
- framework/Core/lib/Horde/Core/Auth/Signup/Sql.php
- framework/Core/lib/Horde/Core/Factory/Auth.php
- framework/Core/lib/Horde/Core/Factory/Db.php

with postgreSQL and TCP/IP (localhost) it works, with postgreSQL and unix_socket it does not work.

The error is similar to the error you fixed for me:

Could not instantiate PDO with DSN &quot;pgsql:host=localhost;dbname=my_db;unix_socket=/var/run/postgresql/&quot;. PDOException: SQLSTATE[08006] [7] ungültige Verbindungsoption (means: invalid option) »unix_socket«

Questions: Why is localhost there mentioned? Its socket, not tcp/ip. and pgsql doesn&#039;t like &#039;unix_socket&#039; it seems :)

Maybe your have to apply your changes also for pgsql via socket?

Thank you for your help!

Torben</description> 
   <pubDate>Thu, 14 Apr 2011 06:25:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63707</link> 
  </item> 
   
  <item> 
   <title>Hi Michael, 

sorry, wrong alarm, it seems also to work wi</title> 
   <description>Hi Michael, 

sorry, wrong alarm, it seems also to work with socket if I do not specify the path to the socket.

thanks a lot!

Torben
</description> 
   <pubDate>Thu, 14 Apr 2011 13:14:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9879#t63725</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
