[horde] horde-prefs, CLI, "Horde_Autoloader PEAR package is unavailable"

Adam Tauno Williams awilliam at whitemice.org
Thu Mar 8 21:43:45 UTC 2012


On Mon, 2011-07-11 at 16:41 -0400, Adam Tauno Williams wrote:
> On Thu, 2011-07-07 at 23:26 +0300, Vilius Šumskas wrote:
> > Thursday, July 7, 2011, 11:02:07 PM, you wrote:
> > > On Thu, 2011-07-07 at 15:44 -0400, Adam Tauno Williams wrote:
> > >> I have a Horde instance that was installed like -
> > >> Now I need to use the horde-prefs script to migrate user's preferences
> > >> from one backend to another.  But I'm stumped as to how to get this CLI
> > >> script to run:
> > >>  php -dinclude_dir=/srv/www/vhosts/horde/pear/php -f
> > >> pear/horde-prefs /tmp/prefs_config.php adam list
> > >> I've tried many variations of this incantation and it always fails with:
> > >> The "Horde_Autoloader" PEAR package is unavailable. Install it with
> > >> "pear install Horde_Autoloader" first!
> > >> This class *is* installed, but I can't make the script environment find
> > >> it.
> > >> /srv/www/vhosts/horde/pear/php/Horde/Autoloader.php
> > > I got the script to run by just hacking in the line:
> > > ini_set("include_path", ".:/srv/www/vhosts/horde/pear/php");
> > > But now it fails with :
> > > PHP Fatal error:  Uncaught exception 'Horde_Prefs_Exception' with
> > > message 'This driver needs to be refactored to use Horde_Ldap.'
> > > in /srv/www/vhosts/horde/pear/php/Horde/Prefs/Storage/Ldap.php:67
> > > Stack trace:
> > > #0 /srv/www/vhosts/horde/pear/horde-prefs(83):
> > > Horde_Prefs_Storage_Ldap->__construct('adam', Array)
> > > #1 {main}
> > >   thrown in
> > > /srv/www/vhosts/horde/pear/php/Horde/Prefs/Storage/Ldap.php
> > > on line 67
> > > Looking at that class I see:
> > >   public function __construct($user, array $params = array())
> > >   {
> > >     throw new Horde_Prefs_Exception('This driver needs to be refactored
> > > to use Horde_Ldap.');
> > >   ...
> > > Are LDAP preferences really not implemented in Horde 5?
> > Correct.
> Ok, I've hacked a Python script to move the preferences from LDAP to the
> PostgreSQL database.  It is a one-time hack, but I've attached it in
> case someone else might find it useful.

I've tidied this script up a bit and committed it to my repo on
SourceForge.

<https://sourceforge.net/u/whitemice/whitemicehg/ci/744fd46eb08e4efe792d30f97cfda70a42c86bea/tree/Scraps/Python/Horde/migrate-from-ldap.py>


-- 
System & Network Administrator [ LPI & NCLA ]
<http://www.whitemiceconsulting.com>
OpenGroupware Developer <http://www.opengroupware.us>
Adam Tauno Williams



More information about the horde mailing list