6.0.0-alpha14
7/2/25

[#14547] PostgresSQL Backend mixup configuration of SQL auth and SQL backend
Summary PostgresSQL Backend mixup configuration of SQL auth and SQL backend
Queue Horde Framework Packages
Type Bug
State Resolved
Priority 1. Low
Owners
Requester torben (at) dannhauer (dot) info
Created 12/22/2016 (3114 days ago)
Due
Updated 02/02/2017 (3072 days ago)
Assigned 01/14/2017 (3091 days ago)
Resolved 02/01/2017 (3073 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
02/02/2017 09:57:57 AM torben (at) dannhauer (dot) info Comment #4 Reply to this comment
Can you see if this commit fixes this behavior?
Sorry for the late reply. I'm curently at parental leave, thus my 
timeplanning is a bit unreliable ;)

Yes the hotfix works on my side, thanks!

As always great service!

Torben
02/01/2017 09:32:53 AM Jan Schneider State ⇒ Resolved
Priority ⇒ 1. Low
 
01/14/2017 05:47:47 PM Michael Rubinsky Comment #3
State ⇒ Feedback
Reply to this comment
Can you see if this commit fixes this behavior?
01/14/2017 05:46:57 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit c2470697f91dfc3cc04edbcab1e0e2ce84ded90a
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Sat Jan 14 12:44:38 2017 -0500

     Bug #14547 Fix using different protocols for the same driver type.

     When merging the base config for the SQL driver we must remove the
     inappropriate settings since they will both be present when the
     config arrays are merged.

  framework/Core/lib/Horde.php | 17 ++++++++++++++++-
  1 file changed, 16 insertions(+), 1 deletion(-)

http://github.com/horde/horde/commit/c2470697f91dfc3cc04edbcab1e0e2ce84ded90a
12/22/2016 03:33:37 PM torben (at) dannhauer (dot) info Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ PostgresSQL Backend mixup configuration of SQL auth and SQL backend
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
== Problematic behaviour ==
When using Horde with PHP7, it mixes pp the different SQL 
configurations in conf.php.
It is not possible to use a local PostgreSQL server as SQL default 
backend via unix socket, and a remote one for authentication via tcp. 
It always adds the socket value also to the auth backend and thus 
failes to connect.
It works as expected when using tcp for both servers.

Example (failing) conf.php:

$conf['sql']['username'] = 'horde-local';
$conf['sql']['password'] = 'LOCAL-PASSWORD';
$conf['sql']['socket'] = '/var/run/postgresql/';
$conf['sql']['protocol'] = 'unix';
$conf['sql']['database'] = 'horde';
$conf['sql']['charset'] = 'utf-8';
$conf['sql']['splitread'] = false;
$conf['sql']['phptype'] = 'pgsql';
$conf['nosql']['phptype'] = false;
$conf['ldap']['useldap'] = false;
$conf['auth']['admins'] = array( 'username@domain.tld', 'Administrator');
$conf['auth']['checkip'] = true;
$conf['auth']['checkbrowser'] = true;
$conf['auth']['resetpassword'] = false;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['list_users'] = 'input';
$conf['auth']['driver'] = 'sql';
$conf['auth']['params']['phptype'] = 'pgsql';
$conf['auth']['params']['username'] = 'horde-remote-for-auth';
$conf['auth']['params']['password'] = 'REMOTE-PASSWORD';
$conf['auth']['params']['hostspec'] = 'remote.host.tld';
$conf['auth']['params']['protocol'] = 'tcp';
$conf['auth']['params']['database'] = 'userdb';
$conf['auth']['params']['charset'] = 'utf-8';
$conf['auth']['params']['splitread'] = false;
$conf['auth']['params']['driverconfig'] = 'custom';
$conf['auth']['params']['table'] = 'users';
$conf['auth']['params']['username_field'] = 'email';
$conf['auth']['params']['password_field'] = 'password';
$conf['auth']['params']['encryption'] = 'crypt-sha512';
$conf['auth']['params']['show_encryption'] = false;
$conf['auth']['driver'] = 'sql';
$conf['auth']['params']['count_bad_logins'] = false;
$conf['auth']['params']['login_block'] = false;
$conf['auth']['params']['login_block_count'] = 5;
$conf['auth']['params']['login_block_time'] = 5;



Using instead
#$conf['sql']['socket'] = '/var/run/postgresql/';
#$conf['sql']['protocol'] = 'unix';
$conf['sql']['protocol'] = 'tcp';
#$conf['sql']['hostspec'] = 'localhost';

it works as expected.


horde is used with current stable releases installed via pear.

== Expected behaviour ==
Horde should seperate SQL and auth SQL fully, to be able to mix up SQL 
setups arbitrary.

Saved Queries