Exception: flea_db_exception_sqlquery
Message: SQL 错误消息: "Access denied for user 'energyme'@'localhost' (using password: YES)"
SQL 语句: "mysql_connect('localhost', 'energyme') failed!"
SQL 错误代码: "7335941".
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/FLEA/FLEA/Db/Driver/Mysql.php
#12
flea_db_exception_sqlquery::flea_db_exception_sqlquery('mysql_connect('localhost', ...', 'Access denied for user 'ene ...', 1045)
FILE: Mysql.php
LINE: 161
ARGS:
Array
(
[0] => mysql_connect('localhost', 'energyme') failed!
[1] => Access denied for user 'energyme'@'localhost' (using password: YES)
[2] => 1045
)
SOURCE CODE:
| 151 |
if (!isset($dsn['login'])) { $dsn['login'] = ''; }
|
| 152 |
if (!isset($dsn['password'])) { $dsn['password'] = ''; }
|
| 153 |
if (isset($dsn['options'])) {
|
| 154 |
$this->conn = mysql_connect($host, $dsn['login'], $dsn['password'], false, $dsn['options']);
|
| 155 |
} else {
|
| 156 |
$this->conn = mysql_connect($host, $dsn['login'], $dsn['password']);
|
| 157 |
}
|
| 158 |
|
| 159 |
if (!$this->conn) {
|
| 160 |
FLEA::loadClass('FLEA_Db_Exception_SqlQuery');
|
| 161 |
__THROW(new FLEA_Db_Exception_SqlQuery("mysql_connect('{$host}', '{$dsn['login']}') failed!", mysql_error(), mysql_errno()));
|
| 162 |
return false;
|
| 163 |
}
|
| 164 |
|
| 165 |
if (!mysql_select_db($dsn['database'], $this->conn)) {
|
| 166 |
FLEA::loadClass('FLEA_Db_Exception_SqlQuery');
|
| 167 |
__THROW(new FLEA_Db_Exception_SqlQuery("SELECT DATABASE: '{$dsn['database']}' FAILED!", mysql_error($this->conn), mysql_errno($this->conn)));
|
| 168 |
return false;
|
| 169 |
}
|
| 170 |
|
| 171 |
$version = $this->getOne('SELECT VERSION()');
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/FLEA/FLEA.php
#11
flea_db_driver_mysql::connect()
FILE: FLEA.php
LINE: 582
ARGS:
Array
(
)
SOURCE CODE:
| 572 |
|
| 573 |
$driver = ucfirst(strtolower($dsn['driver']));
|
| 574 |
$className = 'FLEA_Db_Driver_' . $driver;
|
| 575 |
if ($driver == 'Mysql' || $driver == 'Mysqlt') {
|
| 576 |
require_once(FLEA_DIR . '/Db/Driver/Mysql.php');
|
| 577 |
} else {
|
| 578 |
FLEA::loadClass($className);
|
| 579 |
}
|
| 580 |
$dbo =& new $className($dsn);
|
| 581 |
/* @var $dbo FLEA_Db_Driver_Prototype */
|
| 582 |
$dbo->connect();
|
| 583 |
|
| 584 |
$GLOBALS[G_FLEA_VAR]['DBO'][$dsnid] =& $dbo;
|
| 585 |
return $GLOBALS[G_FLEA_VAR]['DBO'][$dsnid];
|
| 586 |
}
|
| 587 |
|
| 588 |
/**
|
| 589 |
* 分析 DSN 字符串或数组,返回包含 DSN 连接信息的数组,失败返回 false
|
| 590 |
*
|
| 591 |
* @param string|array $dsn
|
| 592 |
*
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/FLEA/FLEA/Db/TableDataGateway.php
#10
flea::getdbo(array(5))
FILE: TableDataGateway.php
LINE: 277
ARGS:
Array
(
[0] => Array
(
[driver] => mysql
[host] => localhost
[login] => energyme
[password] => 4energyme6
[database] => energyme
)
)
SOURCE CODE:
| 267 |
// 当 skipInit 为 true 时,不初始化表数据入口对象
|
| 268 |
if (isset($params['skipConnect']) && $params['skipConnect'] != false) {
|
| 269 |
return;
|
| 270 |
}
|
| 271 |
|
| 272 |
// 初始化数据访问对象
|
| 273 |
if (!isset($params['dbo'])) {
|
| 274 |
if (isset($params['dbDSN'])) {
|
| 275 |
$dbo =& FLEA::getDBO($params['dbDSN']);
|
| 276 |
} else {
|
| 277 |
$dbo =& FLEA::getDBO(FLEA::getAppInf('dbDSN'));
|
| 278 |
}
|
| 279 |
} else {
|
| 280 |
$dbo =& $params['dbo'];
|
| 281 |
}
|
| 282 |
$this->setDBO($dbo);
|
| 283 |
|
| 284 |
// 当 skipCreateLinks 不为 true 时,建立关联
|
| 285 |
if (!isset($params['skipCreateLinks']) || $params['skipCreateLinks'] == false)
|
| 286 |
{
|
| 287 |
$this->relink();
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/APP/GD/MyDB.php
#9
flea_db_tabledatagateway::flea_db_tabledatagateway()
FILE: MyDB.php
LINE: 5
ARGS:
Array
(
)
SOURCE CODE:
| 1 |
<?php
|
| 2 |
load_class('FLEA_Db_TableDataGateway');
|
| 3 |
class GD_MyDb extends FLEA_Db_TableDataGateway {
|
| 4 |
function GD_MyDb() {
|
| 5 |
parent::FLEA_Db_TableDataGateway();
|
| 6 |
}
|
| 7 |
|
| 8 |
/**
|
| 9 |
* 增加findAll
|
| 10 |
*/
|
| 11 |
|
| 12 |
/**
|
| 13 |
* 查询所有符合条件的记录及相关数据,返回一个 FLEA_Db_RowSet 对象
|
| 14 |
*
|
| 15 |
* 如果关联表的数据量很大,那么可以在使用 findAll() 查询之前,设置
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/APP/Table/BoTable.php
#8
gd_mydb::gd_mydb()
FILE: BoTable.php
LINE: 41
ARGS:
Array
(
)
SOURCE CODE:
| 31 |
/**
|
| 32 |
* 构造函数
|
| 33 |
*
|
| 34 |
*
|
| 35 |
*/
|
| 36 |
function Table_BoTable($table,$key){
|
| 37 |
|
| 38 |
$this->tableName = $table;
|
| 39 |
$this->primaryKey = $key;
|
| 40 |
//echo "tableName=".$table."<br>primaryKey=".$key;
|
| 41 |
parent::GD_MyDb();
|
| 42 |
|
| 43 |
}
|
| 44 |
|
| 45 |
}
|
| 46 |
?> |
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/APP/Model/Default.php
#7
table_botable::table_botable('content', 'id')
FILE: Default.php
LINE: 48
ARGS:
Array
(
[0] => content
[1] => id
)
SOURCE CODE:
| 38 |
function help(){
|
| 39 |
$_Content=&new Table_BoTable('content','id');
|
| 40 |
$conditons='title="Help"';
|
| 41 |
$content=$_Content->find($conditons);
|
| 42 |
|
| 43 |
$body=$content['content'];
|
| 44 |
include(APP_DIR.'/templates/help.tpl.php');
|
| 45 |
}
|
| 46 |
|
| 47 |
function showContent(){
|
| 48 |
$_Content=&new Table_BoTable('content','id');
|
| 49 |
//$conditons='title="Help"';
|
| 50 |
$id=(int)$_GET['id'];
|
| 51 |
$content=$_Content->find($id);
|
| 52 |
$title=$content['title'];
|
| 53 |
$body=$content['content'];
|
| 54 |
include(APP_DIR.'/templates/content.tpl.php');
|
| 55 |
}
|
| 56 |
/**
|
| 57 |
* Progress Login
|
| 58 |
*
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/APP/Controller/Default.php
#6
model_default::showcontent()
FILE: Default.php
LINE: 57
ARGS:
Array
(
)
SOURCE CODE:
| 47 |
function actionLogin(){
|
| 48 |
|
| 49 |
$this->_modelClass->login();
|
| 50 |
|
| 51 |
}
|
| 52 |
|
| 53 |
function actionMain(){
|
| 54 |
include(APP_DIR.'/templates/main.tpl.php');
|
| 55 |
}
|
| 56 |
function actionShowContent(){
|
| 57 |
$this->_modelClass->showContent();
|
| 58 |
}
|
| 59 |
/**
|
| 60 |
* 根据数据表的元数据返回一个数组,这个数组包含所有需要初始化的数据,可以用于界面显示
|
| 61 |
*
|
| 62 |
* @param array $meta
|
| 63 |
*
|
| 64 |
* @return array
|
| 65 |
*/
|
| 66 |
function _prepareData(& $meta) {
|
| 67 |
$data = array();
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/FLEA/FLEA/Dispatcher/Simple.php
#5
controller_default::actionshowcontent()
FILE: Simple.php
LINE: 127
ARGS:
Array
(
)
SOURCE CODE:
| 117 |
}
|
| 118 |
if (method_exists($controller, '__setDispatcher')) {
|
| 119 |
$controller->__setDispatcher($this);
|
| 120 |
}
|
| 121 |
|
| 122 |
// 调用 _beforeExecute() 方法
|
| 123 |
if (method_exists($controller, '_beforeExecute')) {
|
| 124 |
$controller->_beforeExecute($actionMethod);
|
| 125 |
}
|
| 126 |
// 执行 action 方法
|
| 127 |
$ret = $controller->{$actionMethod}();
|
| 128 |
// 调用 _afterExecute() 方法
|
| 129 |
if (method_exists($controller, '_afterExecute')) {
|
| 130 |
$controller->_afterExecute($actionMethod);
|
| 131 |
}
|
| 132 |
return $ret;
|
| 133 |
} while (false);
|
| 134 |
|
| 135 |
if ($callback) {
|
| 136 |
// 检查是否调用应用程序设置的错误处理程序
|
| 137 |
$args = array($controllerName, $actionName, $controllerClass);
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/FLEA/FLEA/Dispatcher/Auth.php
#4
flea_dispatcher_auth::_executeaction('Default', 'showContent', 'Controller_Default')
FILE: Auth.php
LINE: 127
ARGS:
Array
(
[0] => Default
[1] => showContent
[2] => Controller_Default
)
SOURCE CODE:
| 117 |
* @return mixed
|
| 118 |
*/
|
| 119 |
function dispatching()
|
| 120 |
{
|
| 121 |
$controllerName = $this->getControllerName();
|
| 122 |
$actionName = $this->getActionName();
|
| 123 |
$controllerClass = $this->getControllerClass($controllerName);
|
| 124 |
|
| 125 |
if ($this->check($controllerName, $actionName, $controllerClass)) {
|
| 126 |
// 检查通过,执行控制器方法
|
| 127 |
return $this->_executeAction($controllerName, $actionName, $controllerClass);
|
| 128 |
} else {
|
| 129 |
// 检查失败
|
| 130 |
$callback = FLEA::getAppInf('dispatcherAuthFailedCallback');
|
| 131 |
|
| 132 |
$rawACT = $this->getControllerACT($controllerName, $controllerClass);
|
| 133 |
if ($rawACT == null || empty($rawACT)) { return true; }
|
| 134 |
$ACT = $this->_auth->prepareACT($rawACT);
|
| 135 |
$roles = $this->_auth->getRolesArray();
|
| 136 |
|
| 137 |
if ($callback) {
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/FLEA/FLEA.php
#3
flea_dispatcher_auth::dispatching()
FILE: FLEA.php
LINE: 644
ARGS:
Array
(
)
SOURCE CODE:
| 634 |
require_once($MVCPackageFilename);
|
| 635 |
}
|
| 636 |
FLEA::init();
|
| 637 |
|
| 638 |
// 载入调度器并转发请求到控制器
|
| 639 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 640 |
FLEA::loadClass($dispatcherClass);
|
| 641 |
|
| 642 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 643 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 644 |
$dispatcher->dispatching();
|
| 645 |
}
|
| 646 |
|
| 647 |
/**
|
| 648 |
* 准备运行环境
|
| 649 |
*
|
| 650 |
* @param boolean $loadMVC
|
| 651 |
*/
|
| 652 |
function init($loadMVC = false)
|
| 653 |
{
|
| 654 |
static $firstTime = true;
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/libs/FLEA/FLEA/Compatibility.php
#2
flea::runmvc()
FILE: Compatibility.php
LINE: 263
ARGS:
Array
(
)
SOURCE CODE:
| 253 |
FLEA::init();
|
| 254 |
}
|
| 255 |
|
| 256 |
/**
|
| 257 |
* FLEA 应用程序入口(已经过时,用 FLEA::runMVC() 代替)
|
| 258 |
*
|
| 259 |
* @deprecated
|
| 260 |
*/
|
| 261 |
function run()
|
| 262 |
{
|
| 263 |
FLEA::runMVC();
|
| 264 |
}
|
| 265 |
|
| 266 |
/**
|
| 267 |
* 初始化 Ajax,返回 FLEA_Ajax 对象实例(已经过时,用 FLEA::initAjax() 代替)
|
| 268 |
*
|
| 269 |
* @return FLEA_Ajax
|
| 270 |
* @deprecated
|
| 271 |
*/
|
| 272 |
function & init_ajax()
|
| 273 |
{
|
Filename: /home/sites/manageevents.co.uk/public_html/energy/index.php
#1
run()
FILE: index.php
LINE: 40
ARGS:
Array
(
)
SOURCE CODE:
| 30 |
/**/
|
| 31 |
// APP_DIR 常量指示模版的保存目录
|
| 32 |
define('APP_DIR', dirname(__FILE__));
|
| 33 |
define('TPL_DIR',APP_DIR.'/templates');
|
| 34 |
|
| 35 |
require('libs/FLEA/FLEA.php');
|
| 36 |
register_app_inf(APP_DIR . '/libs/APP/Config/DSN.php');
|
| 37 |
register_app_inf(APP_DIR . '/libs/APP/Config/BO_APP_INF.php');
|
| 38 |
import(APP_DIR . '/libs/APP');
|
| 39 |
|
| 40 |
run();
|
| 41 |
?> |