Exception: FLEA_Db_Exception_SqlQuery
Message: SQL 错误消息: "Access denied for user 'root'@'localhost' (using password: YES)"
SQL 语句: "mysql_connect('localhost', 'root') failed!"
SQL 错误代码: "7335941".
Filename: D:\home\EPWeb\FLEA\FLEA.php [752]
#11 FLEA_Db_Driver_Mysql::connect()
ARGS:
Array
(
)
SOURCE CODE:
| 742 |
|
| 743 |
$driver = ucfirst(strtolower($dsn['driver']));
|
| 744 |
$className = 'FLEA_Db_Driver_' . $driver;
|
| 745 |
if ($driver == 'Mysql' || $driver == 'Mysqlt') {
|
| 746 |
require_once(FLEA_DIR . '/Db/Driver/Mysql.php');
|
| 747 |
} else {
|
| 748 |
FLEA::loadClass($className);
|
| 749 |
}
|
| 750 |
$dbo =& new $className($dsn);
|
| 751 |
/* @var $dbo FLEA_Db_Driver_Abstract */
|
| 752 |
$dbo->connect();
|
| 753 |
|
| 754 |
$GLOBALS[G_FLEA_VAR]['DBO'][$dsnid] =& $dbo;
|
| 755 |
return $GLOBALS[G_FLEA_VAR]['DBO'][$dsnid];
|
| 756 |
}
|
| 757 |
|
| 758 |
/**
|
| 759 |
* 分析 DSN 字符串或数组,返回包含 DSN 连接信息的数组,失败返回 false
|
| 760 |
*
|
| 761 |
* @param string|array $dsn
|
| 762 |
*
|
Filename: D:\home\EPWeb\FLEA\FLEA\Db\TableDataGateway.php [301]
#10 FLEA::getDBO()
ARGS:
Array
(
)
SOURCE CODE:
| 291 |
// 当 skipInit 为 true 时,不初始化表数据入口对象
|
| 292 |
if (isset($params['skipConnect']) && $params['skipConnect'] != false) {
|
| 293 |
return;
|
| 294 |
}
|
| 295 |
|
| 296 |
// 初始化数据访问对象
|
| 297 |
if (!isset($params['dbo'])) {
|
| 298 |
if (isset($params['dbDSN'])) {
|
| 299 |
$dbo =& FLEA::getDBO($params['dbDSN']);
|
| 300 |
} else {
|
| 301 |
$dbo =& FLEA::getDBO();
|
| 302 |
}
|
| 303 |
} else {
|
| 304 |
$dbo =& $params['dbo'];
|
| 305 |
}
|
| 306 |
$this->setDBO($dbo);
|
| 307 |
|
| 308 |
// 当 skipCreateLinks 不为 true 时,建立关联
|
| 309 |
if (!isset($params['skipCreateLinks']) || $params['skipCreateLinks'] == false) {
|
| 310 |
$this->relink();
|
| 311 |
}
|
Filename: D:\home\EPWeb\FLEA\FLEA.php [422]
#9 FLEA_Db_TableDataGateway::FLEA_Db_TableDataGateway()
ARGS:
Array
(
)
SOURCE CODE:
| 412 |
} else {
|
| 413 |
$classExists = class_exists($className);
|
| 414 |
}
|
| 415 |
if (!$classExists) {
|
| 416 |
if (!FLEA::loadClass($className)) {
|
| 417 |
$return = false;
|
| 418 |
return $return;
|
| 419 |
}
|
| 420 |
}
|
| 421 |
|
| 422 |
$instances[$className] =& new $className();
|
| 423 |
FLEA::register($instances[$className], $className);
|
| 424 |
return $instances[$className];
|
| 425 |
}
|
| 426 |
|
| 427 |
/**
|
| 428 |
* 将一个对象实例注册到对象实例容器,以便稍后取出
|
| 429 |
*
|
| 430 |
* example:
|
| 431 |
* <code>
|
| 432 |
* $obj =& new MyClass();
|
Filename: D:\home\EPWeb\WEB\Controller\BasicCtl.php [72]
#8 FLEA::getSingleton('Table_SystemConfig')
ARGS:
Array
(
[0] => Table_SystemConfig
)
SOURCE CODE:
| 62 |
//echo $time . "<br>" . $file_modify_time . "<br>" .$diff;
|
| 63 |
$cycle = FLEA::getAppInf('xg_rss_snap_cycle') * 60 ;
|
| 64 |
if( $diff > $cycle) {
|
| 65 |
// 超过了周期
|
| 66 |
return true;
|
| 67 |
}
|
| 68 |
return false;
|
| 69 |
}
|
| 70 |
|
| 71 |
function initSystemConfig($id = null){
|
| 72 |
$scdao = & FLEA::getSingleton("Table_SystemConfig");
|
| 73 |
if( isset($id) )
|
| 74 |
$this->sc = $scdao->find(array($scdao->primaryKey => $id ) , null, "*", false);
|
| 75 |
else
|
| 76 |
$this->sc = $scdao->find(null , null, "*", false);
|
| 77 |
}
|
| 78 |
|
| 79 |
function actionImgCode() {
|
| 80 |
$imgcode =& FLEA::getSingleton('FLEA_Helper_ImgCode');
|
| 81 |
/* @var $imgcode FLEA_Helper_ImgCode */
|
| 82 |
$imgcode->image();
|
Filename: D:\home\EPWeb\WEB\Controller\BasicCtl.php [35]
#7 Controller_BasicCtl::initSystemConfig()
ARGS:
Array
(
)
SOURCE CODE:
| 25 |
var $page ;
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
/**
|
| 30 |
* 检测命令行中是否有lang参数;
|
| 31 |
* 检查cookie中是否有lang属性;
|
| 32 |
* 使用默认的language;
|
| 33 |
*/
|
| 34 |
function Controller_BasicCtl(){
|
| 35 |
$this->initSystemConfig();
|
| 36 |
$this->language = $_SESSION['LANG'];
|
| 37 |
/*$lang = $_REQUEST['lang'];
|
| 38 |
if( isset($lang) && $lang != ""){
|
| 39 |
$this->language = $lang;
|
| 40 |
$this->addLangCookie($this->language);
|
| 41 |
}
|
| 42 |
else {
|
| 43 |
$this->language = $_COOKIE["xg_language"];
|
| 44 |
if($this->language == null || $this->language == "") {
|
| 45 |
//$this->language = FLEA::getAppInf('defaultLanguage');
|
Filename: D:\home\EPWeb\WEB\Controller\HtmlGenerator\CmsHtmlFile.php [74]
#6 Controller_BasicCtl::Controller_BasicCtl()
ARGS:
Array
(
)
SOURCE CODE:
| 64 |
* include_htmlfile : used for include ;
|
| 65 |
*/
|
| 66 |
var $htmlfile;
|
| 67 |
var $full_htmlfile;
|
| 68 |
var $include_htmlfile;
|
| 69 |
|
| 70 |
//var $cmsConfig;
|
| 71 |
|
| 72 |
function Controller_HtmlGenerator_CmsHtmlFile(){
|
| 73 |
// init variables
|
| 74 |
parent::Controller_BasicCtl();
|
| 75 |
$this->scDao = & FLEA::getSingleton("Table_SystemConfig");
|
| 76 |
$this->tplDao = & FLEA::getSingleton("Table_Template");
|
| 77 |
$this->suitDao = & FLEA::getSingleton("Table_TemplateSuit");
|
| 78 |
$this->userDao = & FLEA::getSingleton("Table_Users");
|
| 79 |
$this->funDao = & FLEA::getSingleton("Table_Function");
|
| 80 |
}
|
| 81 |
|
| 82 |
// function initVersion($name){
|
| 83 |
// $this->version = $this->versionDao->find(
|
| 84 |
// array("host_name" => $name, "_default" => true) );
|
Filename: D:\home\EPWeb\WEB\Controller\Default.php [9]
#5 Controller_HtmlGenerator_CmsHtmlFile::Controller_HtmlGenerator_CmsHtmlFile()
ARGS:
Array
(
)
SOURCE CODE:
| 1 |
<?php
|
| 2 |
|
| 3 |
FLEA::loadClass("Controller_HtmlGenerator_CmsHtmlFile");
|
| 4 |
class Controller_Default extends Controller_HtmlGenerator_CmsHtmlFile
|
| 5 |
{
|
| 6 |
|
| 7 |
// default constructor function;
|
| 8 |
function Controller_Default(){
|
| 9 |
parent::Controller_HtmlGenerator_CmsHtmlFile();
|
| 10 |
$_SESSION['ctl'] = "default";
|
| 11 |
}
|
| 12 |
/**
|
| 13 |
* 默认控制器方法
|
| 14 |
*/
|
| 15 |
function actionIndex() {
|
| 16 |
// 添加Cookie
|
| 17 |
$filename = $this->getIndexHtmlFileName();
|
| 18 |
$this->include_htmlfile = $filename;
|
| 19 |
if( $this->needRegenerate($filename, $this->scDao, 1) || $this->regenerateRss($filename)) {
|
Filename: D:\home\EPWeb\FLEA\FLEA\Dispatcher\Simple.php [106]
#4 Controller_Default::Controller_Default('default')
ARGS:
Array
(
[0] => default
)
SOURCE CODE:
| 96 |
|
| 97 |
$controller = null;
|
| 98 |
$controllerClassFilename = null;
|
| 99 |
do {
|
| 100 |
// 载入控制对应的类定义
|
| 101 |
if (!$this->_loadController($controllerClass)) { break; }
|
| 102 |
|
| 103 |
// 构造控制器对象
|
| 104 |
FLEA::setAppInf('FLEA.internal.currentControllerName', $controllerName);
|
| 105 |
FLEA::setAppInf('FLEA.internal.currentActionName', $actionName);
|
| 106 |
$controller =& new $controllerClass($controllerName);
|
| 107 |
if (!method_exists($controller, $actionMethod)) { break; }
|
| 108 |
if (method_exists($controller, '__setController')) {
|
| 109 |
$controller->__setController($controllerName, $actionName);
|
| 110 |
}
|
| 111 |
if (method_exists($controller, '__setDispatcher')) {
|
| 112 |
$controller->__setDispatcher($this);
|
| 113 |
}
|
| 114 |
|
| 115 |
// 调用 _beforeExecute() 方法
|
| 116 |
if (method_exists($controller, '_beforeExecute')) {
|
Filename: D:\home\EPWeb\FLEA\FLEA\Dispatcher\Auth.php [127]
#3 FLEA_Dispatcher_Simple::_executeAction('default', 'index', 'Controller_Default')
ARGS:
Array
(
[0] => default
[1] => index
[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 (is_null($rawACT) || empty($rawACT)) { return true; }
|
| 134 |
$ACT = $this->_auth->prepareACT($rawACT);
|
| 135 |
$roles = $this->_auth->getRolesArray();
|
| 136 |
$args = array($controllerName, $actionName, $controllerClass, $ACT, $roles);
|
| 137 |
|
Filename: D:\home\EPWeb\FLEA\FLEA.php [816]
#2 FLEA_Dispatcher_Auth::dispatching()
ARGS:
Array
(
)
SOURCE CODE:
| 806 |
require_once($MVCPackageFilename);
|
| 807 |
}
|
| 808 |
FLEA::init();
|
| 809 |
|
| 810 |
// 载入调度器并转发请求到控制器
|
| 811 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 812 |
FLEA::loadClass($dispatcherClass);
|
| 813 |
|
| 814 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 815 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 816 |
$dispatcher->dispatching();
|
| 817 |
}
|
| 818 |
|
| 819 |
/**
|
| 820 |
* 准备运行环境
|
| 821 |
*
|
| 822 |
* @param boolean $loadMVC
|
| 823 |
*/
|
| 824 |
function init($loadMVC = false)
|
| 825 |
{
|
| 826 |
|
Filename: D:\home\EPWeb\index.php [77]
#1 FLEA::runMVC()
ARGS:
Array
(
)
SOURCE CODE:
| 67 |
FLEA::loadAppInf($dbConfigFilename);
|
| 68 |
//FLEA::loadAppInf($configFilename);
|
| 69 |
//echo "default langugae : " . FLEA::getAppInf('defaultLanguage');
|
| 70 |
// use RBAC
|
| 71 |
FLEA::setAppInf('dispatcher', 'FLEA_Dispatcher_Auth');
|
| 72 |
|
| 73 |
// 设置时区;
|
| 74 |
date_default_timezone_set(FLEA::getAppInf('xg_time_zone'));
|
| 75 |
|
| 76 |
FLEA::import(APP_DIR);
|
| 77 |
FLEA::runMVC();
|
| 78 |
|
| 79 |
/**
|
| 80 |
* 自定义的控制器出错提示,需要修改应用程序设置(WEB/Config/Config.php)
|
| 81 |
*
|
| 82 |
* @param unknown_type $controller
|
| 83 |
* @param unknown_type $action
|
| 84 |
*/
|
| 85 |
function onXenGingDispatcherFailedCallback($controller,$action)
|
| 86 |
{
|
| 87 |
// load_language('ui');
|