[horde] Crashed Horde when tried to implement multiple emails for single contact

Louis-Philippe Allard lp.allard.1 at gmail.com
Sat Jan 28 18:29:38 UTC 2012


Hi there,

I have tried to implement multi-email addresses in a single contact
using the instructions at
http://wiki.horde.org/TurbaExtraFields?referrer=HowTo but when I
login, I get:

*******************************
A fatal error has occurred
Failed to import configuration file
"/var/www/htdocs/horde4/lib/../turba/config/attributes.local.php":
$attributes['email'] = array( 'label' => _("Email"), 'type' =>
'email', 'required' => false, 'params' => array('allow_multi' => true,
'strip_domain' => false, 'link_compose' => true) );
$attributes['workEmail'] = array( 'label' => _("Work Email"), 'type'
=> 'email', 'required' => false, 'params' => array('allow_multi' =>
true, 'strip_domain' => false, 'link_compose' => true) );
$attributes['homeEmail'] = array( 'label' => _("Home Email"), 'type'
=> 'email', 'required' => false, 'params' => array('allow_multi' =>
true, 'strip_domain' => false, 'link_compose' => true) );

 1. Horde_Core_Auth_Application->authenticate()
/var/www/htdocs/horde4/login.php:151
 2. Horde_Core_Auth_Application->authenticate()
/usr/lib/php/Horde/Core/Auth/Application.php:129
 3. Horde_Core_Auth_Application->_setAuth()
/usr/lib/php/Horde/Core/Auth/Application.php:141
 4. Horde_Registry->callAppMethod()
/usr/lib/php/Horde/Core/Auth/Application.php:659
 5. Horde_Registry->pushApp() /usr/lib/php/Horde/Registry.php:1080
 6. Horde_Registry->loadPrefs() /usr/lib/php/Horde/Registry.php:1326
 7. Horde_Prefs->retrieve() /usr/lib/php/Horde/Registry.php:1499
 8. Horde_Prefs->_loadScope() /usr/lib/php/Horde/Prefs.php:343
 9. Horde_Core_Prefs_Storage_Hooks->get() /usr/lib/php/Horde/Prefs.php:375
10. Horde::callHook() /usr/lib/php/Horde/Core/Prefs/Storage/Hooks.php:30
11. call_user_func_array() /usr/lib/php/Horde.php:1827
12. IMP_Hooks->prefs_init()
13. Horde_Registry->call() /var/www/htdocs/horde4/imp/config/hooks.php:29
14. Horde_Registry->callByPackage() /usr/lib/php/Horde/Registry.php:979
15. Horde_Registry->pushApp() /usr/lib/php/Horde/Registry.php:1017
16. Horde_Registry->callAppMethod() /usr/lib/php/Horde/Registry.php:1355
17. call_user_func_array() /usr/lib/php/Horde/Registry.php:1083
18. Horde_Registry_Application->init()
19. Turba_Application->_init() /usr/lib/php/Horde/Registry/Application.php:89
20. Horde::loadConfiguration()
/var/www/htdocs/horde4/turba/lib/Application.php:58

Details
The full error message is logged in Horde's log file, and is shown
below only to administrators. Non-administrative users will not see
error details.

Horde_Exception Object
(
    [_previous:private] =>
    [details] =>
    [message:protected] => Failed to import configuration file
"/var/www/htdocs/horde4/lib/../turba/config/attributes.local.php":
$attributes['email'] = array(
    'label' => _("Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => true, 'strip_domain' => false,
'link_compose' => true)
);
$attributes['workEmail'] = array(
    'label' => _("Work Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => true, 'strip_domain' => false,
'link_compose' => true)
);
$attributes['homeEmail'] = array(
    'label' => _("Home Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => true, 'strip_domain' => false,
'link_compose' => true)
);
[...]
*******************************

What I've done:

1-Logout of Horde
2-Created a attribute.local.php with the following in it:

$attributes['email'] = array(
    'label' => _("Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => true, 'strip_domain' => false,
'link_compose' => true)
);
$attributes['workEmail'] = array(
    'label' => _("Work Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => true, 'strip_domain' => false,
'link_compose' => true)
);
$attributes['homeEmail'] = array(
    'label' => _("Home Email"),
    'type' => 'email',
    'required' => false,
    'params' => array('allow_multi' => true, 'strip_domain' => false,
'link_compose' => true)
);

3-Added these lines under "  'email' => 'object_email',  " in backends.php:

'homeEmail' => 'object_email2',
'workEmail' => 'object_email3',

4-Added these fields in table turba_objects of my horde DB:

Field name    	Type    	        Allow nulls?    	Key    	Default value
----------------------------------------------------------------------------------------------------------------
object_email2 	varchar(255) 	Yes 	                Indexed 	NULL 	
object_email3 	varchar(255) 	Yes 	                Indexed 	NULL


All files have proper permissions (apache:apache)

If you can help, please do!   I either need to revert the changes or
make it work very soon since Im in need of having horde working for my
upcoming move..

Thanks for any help I can get!

Louis


More information about the horde mailing list