When installing horde to a custom pear location, you need to run the pear of your custom location, not the system pear with the custom location’s config.
So the steps would be:
1 mkdir /srv/horde 2 pear config-create /srv/horde/ /srv/horde/pear.conf 3 pear -c /srv/horde/pear.conf install PEAR
as the install docs say but then:
4 /srv/horde/pear/pear -c /srv/horde/pear.conf channel-discover pear.horde.org 5 /srv/horde/pear/pear -c /srv/horde/pear.conf run-scripts horde/Horde_Role 6 /srv/horde/pear/pear -c /srv/horde/pear.conf install --alldeps horde/groupware
Otherwise running the Horde_Role script will fail saying
config-set (horde_dir, /srv/horde/, user) failed, channel pear.php.net
This was experienced on SLES11SP1, SLES11SP2 and openSUSE Factory.
I did not test this for any debian based products yet.