diff --git a/phpgwapi/inc/class.accounts_ads.inc.php b/phpgwapi/inc/class.accounts_ads.inc.php
index 2741cf3923..032b3939bd 100644
--- a/phpgwapi/inc/class.accounts_ads.inc.php
+++ b/phpgwapi/inc/class.accounts_ads.inc.php
@@ -102,6 +102,7 @@ class accounts_ads
* Constructor
*
* @param accounts $frontend reference to the frontend class, to be able to call it's methods if needed
+ * @throws adLDAPException
* @return accounts_ldap
*/
function __construct(accounts $frontend)
diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php
index 2791d154e7..dba70ac37f 100644
--- a/phpgwapi/inc/class.accounts_ldap.inc.php
+++ b/phpgwapi/inc/class.accounts_ldap.inc.php
@@ -128,7 +128,7 @@ class accounts_ldap
// enable the caching in the session, done by the accounts class extending this class.
$this->use_session_cache = true;
- $this->ldap = new ldap();
+ $this->ldap = new ldap(true);
$this->ds = $this->ldap->ldapConnect($this->frontend->config['ldap_host'],
$this->frontend->config['ldap_root_dn'],$this->frontend->config['ldap_root_pw']);
diff --git a/phpgwapi/inc/common_functions.inc.php b/phpgwapi/inc/common_functions.inc.php
index ea800d24e2..959c1b34ae 100755
--- a/phpgwapi/inc/common_functions.inc.php
+++ b/phpgwapi/inc/common_functions.inc.php
@@ -1548,7 +1548,7 @@ function _egw_log_exception(Exception $e,&$headline=null)
// which outputs the error_log to stderr and therefore output it twice to the user
if(isset($_SERVER['HTTP_HOST']) || $GLOBALS['egw_info']['flags']['no_exception_handler'] !== 'cli')
{
- error_log($headline.': '.$e->getMessage());
+ error_log($headline.' ('.get_class($e).'): '.$e->getMessage());
foreach(explode("\n",$e->getTraceAsString()) as $line) error_log($line);
error_log('# Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid'].', URL='.
($_SERVER['HTTPS']?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
diff --git a/setup/inc/class.setup.inc.php b/setup/inc/class.setup.inc.php
index a954aaa6d0..18b72506c5 100644
--- a/setup/inc/class.setup.inc.php
+++ b/setup/inc/class.setup.inc.php
@@ -1005,15 +1005,15 @@ class setup
$GLOBALS['egw_info']['server'][$row['config_name']] = $config[$row['config_name']] = $row['config_value'];
}
}
- $this->accounts = new accounts($config);
- if (!isset($GLOBALS['egw']->accounts)) $GLOBALS['egw']->accounts = $this->accounts;
- accounts::cache_invalidate(); // the cache is shared for all instances of the class
-
- if($this->accounts->backend instanceof accounts_ldap && !$this->accounts->backend->ds)
- {
- printf("Error: Error connecting to LDAP server %s!
",$config['ldap_host']);
+ try {
+ $this->accounts = new accounts($config);
+ }
+ catch (Exception $e) {
+ echo "
".$e->getMessage()."
\n"; return false; } + if (!isset($GLOBALS['egw']->accounts)) $GLOBALS['egw']->accounts = $this->accounts; + accounts::cache_invalidate(); // the cache is shared for all instances of the class } return true; }