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

Adam Tauno Williams awilliam at whitemice.org
Mon Jul 11 20:41:21 UTC 2011


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hordeMigrate-example.py
Type: text/x-python
Size: 2927 bytes
Desc: not available
URL: <http://lists.horde.org/archives/horde/attachments/20110711/64265eb8/attachment-0001.py>


More information about the horde mailing list