![]() |
connect database error - Printable Version +- LetoDMS Community Forum (https://community.letodms.com) +-- Forum: LetoDMS Support (https://community.letodms.com/forumdisplay.php?fid=4) +--- Forum: Bugs/Errors (https://community.letodms.com/forumdisplay.php?fid=11) +--- Thread: connect database error (/showthread.php?tid=596) |
connect database error - informativa - 11-27-2012 when the data base passord is incorrect and it is impossible co connect the script Inc.DBinit.php d not intercept error i create this test if(!empty($settings->_coreDir)) require_once($settings->_coreDir.'/Core.php'); else require_once('LetoDMS/Core.php'); $settings->_dbPass='pippo'; echo "<br>".$settings->_dbDriver."<br>".$settings->_dbHostname."<br>". $settings->_dbUser."<br>". $settings->_dbPass."<br>". $settings->_dbDatabase."<br>"; $db = new LetoDMS_Core_DatabaseAccess($settings->_dbDriver, $settings->_dbHostname, $settings->_dbUser, $settings->_dbPass, $settings->_dbDatabase); $db->connect() or die ("Could not connect to db-server \"" . $settings->_dbHostname . "\""); $dms = new LetoDMS_Core_DMS($db, $settings->_contentDir.$settings->_contentOffsetDir); if(!$dms->checkVersion()) { echo "Aggiornamento database necessario; Database update needed."; exit; } $dms->setRootFolderID($settings->_rootFolderID); $dms->setMaxDirID($settings->_maxDirID); $dms->setEnableAdminRevApp($settings->_enableAdminRevApp); $dms->setEnableConverting($settings->_enableConverting); $dms->setViewOnlineFileTypes($settings->_viewOnlineFileTypes); I force new incorrect password (pippo) this is the result: mysql localhost censored pippo informat_letodms34 Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'censored'@'localhost' (using password: YES) in /home/censored/public_html/adodb/drivers/adodb-mysql.inc.php on line 443 this is the adodb_mysql....function // returns true or false function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) { if (!empty($this->port)) $argHostname .= ":".$this->port; if (ADODB_PHPVER >= 0x4300) $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, $this->forceNewConnect,$this->clientFlags); else if (ADODB_PHPVER >= 0x4200) $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword, $this->forceNewConnect); else $this->_connectionID = mysql_connect($argHostname,$argUsername,$argPassword); if ($this->_connectionID === false) return false; if ($argDatabasename) return $this->SelectDB($argDatabasename); return true; } question why istru DIE no run? regards |