summaryrefslogtreecommitdiffstats
path: root/lib/setup.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-04-29 12:25:27 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-05-22 13:59:07 +0200
commiteceb3c8ed5f3068808bc8fc5ceec5fda1ac50db9 (patch)
tree1bc89bd6cc323d864b5035c497d69436470e2e9a /lib/setup.php
parent1b68c0c0cdf1fb68149efd18e661be0a38bcfd62 (diff)
downloadnextcloud-server-eceb3c8ed5f3068808bc8fc5ceec5fda1ac50db9.tar.gz
nextcloud-server-eceb3c8ed5f3068808bc8fc5ceec5fda1ac50db9.zip
add debug output
Diffstat (limited to 'lib/setup.php')
-rw-r--r--lib/setup.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/setup.php b/lib/setup.php
index f1ac6b8b2b8..6f608ec5fb1 100644
--- a/lib/setup.php
+++ b/lib/setup.php
@@ -152,8 +152,12 @@ class OC_Setup {
self::setupOCIDatabase($dbhost, $dbuser, $dbpass, $dbname, $dbtableprefix, $dbtablespace, $username);
} catch (Exception $e) {
$error[] = array(
- 'error' => $l->t('Oracle username and/or password not valid'),
- 'hint' => $l->t('You need to enter either an existing account or the administrator.')
+ 'error' => $l->t('Oracle connection could not be established'),
+ 'hint' => $e->getMessage().' Check environment: ORACLE_HOME='.getenv('ORACLE_HOME')
+ .' ORACLE_SID='.getenv('ORACLE_SID')
+ .' LD_LIBRARY_PATH='.getenv('LD_LIBRARY_PATH')
+ .' NLS_LANG='.getenv('NLS_LANG')
+ .' tnsnames.ora is '.(is_readable(getenv('ORACLE_HOME').'/network/admin/tnsnames.ora')?'':'not ').'readable'
);
return $error;
}
@@ -452,9 +456,13 @@ class OC_Setup {
} else {
$easy_connect_string = '//'.$e_host.'/'.$e_dbname;
}
+ \OC_Log::write('setup oracle', 'connect string: '.$easy_connect_string, \OC_Log::DEBUG);
$connection = @oci_connect($dbuser, $dbpass, $easy_connect_string);
if(!$connection) {
$e = oci_error();
+ if (is_array ($e) && isset ($e['message'])) {
+ throw new Exception($e['message']);
+ }
throw new Exception($l->t('Oracle username and/or password not valid'));
}
//check for roles creation rights in oracle