diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-06-03 18:06:13 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-06-03 18:06:13 -0400 |
commit | 1c617321931494e04ae429c659eda2d0217346cb (patch) | |
tree | 4df7aa0b565a978b568f0a3a948bedfb40c7f672 /lib/setup.php | |
parent | d50d663928a924a359b504c20406550758da7c2d (diff) | |
parent | d921004a6e40f7770cc416871fb9500662b561b6 (diff) | |
download | nextcloud-server-1c617321931494e04ae429c659eda2d0217346cb.tar.gz nextcloud-server-1c617321931494e04ae429c659eda2d0217346cb.zip |
Merge branch 'master' into convert-oc_config
Diffstat (limited to 'lib/setup.php')
-rw-r--r-- | lib/setup.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/setup.php b/lib/setup.php index 376b71fc03b..fd22141f1b9 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -138,8 +138,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; } @@ -438,9 +442,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 |