Exception: FLEA_Db_Exception_SqlQuery
Message: SQL Error Message: "Lost connection to MySQL server during query"
SQL : "mysql_connect('localhost', '10000li_net') failed!"
SQL Error code: "7335941".
Filename: /var/www/html/tianjin2008/APP/FLEA/FLEA.php
#8
FLEA_Db_Driver_Mysql::connect()
FILE: FLEA.php
LINE: 559
ARGS:
Array
(
)
SOURCE CODE:
| 549 |
|
| 550 |
$driver = ucfirst(strtolower($dsn['driver']));
|
| 551 |
$className = 'FLEA_Db_Driver_' . $driver;
|
| 552 |
if ($driver == 'Mysql' || $driver == 'Mysqlt') {
|
| 553 |
require_once(FLEA_DIR . '/Db/Driver/Mysql.php');
|
| 554 |
} else {
|
| 555 |
FLEA::loadClass($className);
|
| 556 |
}
|
| 557 |
$dbo =& new $className($dsn);
|
| 558 |
/* @var $dbo FLEA_Db_Driver_Prototype */
|
| 559 |
$dbo->connect();
|
| 560 |
|
| 561 |
$GLOBALS[G_FLEA_VAR]['DBO'][$dsnid] =& $dbo;
|
| 562 |
return $GLOBALS[G_FLEA_VAR]['DBO'][$dsnid];
|
| 563 |
}
|
| 564 |
|
| 565 |
/**
|
| 566 |
* 分析 DSN 字符串或数组,返回包含 DSN 连接信息的数组,失败返回 false
|
| 567 |
*
|
| 568 |
* @param string|array $dsn
|
| 569 |
*
|
Filename: /var/www/html/tianjin2008/APP/FLEA/FLEA/Db/TableDataGateway.php
#7
FLEA::getDBO(array(5))
FILE: TableDataGateway.php
LINE: 277
ARGS:
Array
(
[0] => Array
(
[driver] => mysql
[host] => localhost
[login] => 10000li_net
[password] => YFdhrFhbTAhKCTFD
[database] => 10000li_net
)
)
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: /var/www/html/tianjin2008/APP/FLEA/FLEA.php
#6
FLEA_Db_TableDataGateway::FLEA_Db_TableDataGateway()
FILE: FLEA.php
LINE: 318
ARGS:
Array
(
)
SOURCE CODE:
| 308 |
// 返回已经存在的对象实例
|
| 309 |
return FLEA::registry($className);
|
| 310 |
}
|
| 311 |
if (!class_exists($className)) {
|
| 312 |
if (!FLEA::loadClass($className)) {
|
| 313 |
$return = false;
|
| 314 |
return $return;
|
| 315 |
}
|
| 316 |
}
|
| 317 |
|
| 318 |
$instances[$className] =& new $className();
|
| 319 |
FLEA::register($instances[$className], $className);
|
| 320 |
return $instances[$className];
|
| 321 |
}
|
| 322 |
|
| 323 |
/**
|
| 324 |
* 将一个对象实例注册到对象实例容器
|
| 325 |
*
|
| 326 |
* @param object $obj
|
| 327 |
* @param string $name
|
| 328 |
*
|
Filename: /var/www/html/tianjin2008/APP/Controller/article.php
#5
FLEA::getSingleton('Model_News')
FILE: article.php
LINE: 13
ARGS:
Array
(
[0] => Model_News
)
SOURCE CODE:
| 3 |
class Controller_article extends FLEA_Controller_Action
|
| 4 |
{
|
| 5 |
|
| 6 |
function actionIndex()
|
| 7 |
{
|
| 8 |
$news_id = isset($_GET['id'])?$_GET['id']:null;
|
| 9 |
$cacheId = 'article'.$news_id;
|
| 10 |
$viewdata = FLEA::getCache($cacheId, 86400);
|
| 11 |
if (!$viewdata) {
|
| 12 |
|
| 13 |
$model_news =& flea::getSingleton('Model_News');
|
| 14 |
$model_newslist =& flea::getSingleton('Model_newsList');
|
| 15 |
|
| 16 |
//获得焦点新闻的数据
|
| 17 |
$model_news->createLink(array(
|
| 18 |
array(
|
| 19 |
'tableClass' => 'Model_keywords',
|
| 20 |
'joinTable' => 'news_keyword',
|
| 21 |
'foreignKey' => 'news_id',
|
| 22 |
'assocforeignKey' => 'k_id',
|
| 23 |
'mappingName' => 'keyname',
|
Filename: /var/www/html/tianjin2008/APP/FLEA/FLEA/Dispatcher/Simple.php
#4
Controller_article::actionIndex()
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: /var/www/html/tianjin2008/APP/FLEA/FLEA/Dispatcher/Simple.php
#3
FLEA_Dispatcher_Simple::_executeAction('article', 'index', 'Controller_article')
FILE: Simple.php
LINE: 77
ARGS:
Array
(
[0] => article
[1] => index
[2] => Controller_article
)
SOURCE CODE:
| 67 |
|
| 68 |
/**
|
| 69 |
* 从请求中分析 Controller、Action 和 Package 名字,然后执行指定的 Action 方法
|
| 70 |
*
|
| 71 |
* @return mixed
|
| 72 |
*/
|
| 73 |
function dispatching()
|
| 74 |
{
|
| 75 |
$controllerName = $this->getControllerName();
|
| 76 |
$actionName = $this->getActionName();
|
| 77 |
return $this->_executeAction($controllerName, $actionName, $this->getControllerClass($controllerName));
|
| 78 |
}
|
| 79 |
|
| 80 |
/**
|
| 81 |
* 执行指定的 Action 方法
|
| 82 |
*
|
| 83 |
* @param string $controllerName
|
| 84 |
* @param string $actionName
|
| 85 |
* @param string $controllerClass
|
| 86 |
*
|
| 87 |
* @return mixed
|
Filename: /var/www/html/tianjin2008/APP/FLEA/FLEA.php
#2
FLEA_Dispatcher_Simple::dispatching()
FILE: FLEA.php
LINE: 621
ARGS:
Array
(
)
SOURCE CODE:
| 611 |
require_once($MVCPackageFilename);
|
| 612 |
}
|
| 613 |
FLEA::init();
|
| 614 |
|
| 615 |
// 载入调度器并转发请求到控制器
|
| 616 |
$dispatcherClass = FLEA::getAppInf('dispatcher');
|
| 617 |
FLEA::loadClass($dispatcherClass);
|
| 618 |
|
| 619 |
$dispatcher =& new $dispatcherClass($_GET);
|
| 620 |
FLEA::register($dispatcher, $dispatcherClass);
|
| 621 |
$dispatcher->dispatching();
|
| 622 |
}
|
| 623 |
|
| 624 |
/**
|
| 625 |
* 准备运行环境
|
| 626 |
*
|
| 627 |
* @param boolean $loadMVC
|
| 628 |
*/
|
| 629 |
function init($loadMVC = false)
|
| 630 |
{
|
| 631 |
static $firstTime = true;
|
Filename: /var/www/html/tianjin2008/article.php
#1
FLEA::runMVC()
FILE: article.php
LINE: 29
ARGS:
Array
(
)
SOURCE CODE:
| 19 |
'compile_dir' => $dirname . '/templates_c',
|
| 20 |
'left_delimiter' => '{{',
|
| 21 |
'right_delimiter' => '}}',
|
| 22 |
);
|
| 23 |
FLEA::setAppInf('viewConfig',$smartyconfig);
|
| 24 |
FLEA::setAppInf('defaultController','article');
|
| 25 |
|
| 26 |
FLEA::import(APP_DIR);
|
| 27 |
FLEA::loadFile('FLEA_Helper_Array.php');
|
| 28 |
FLEA::loadFile('Model_myHelpers.php');
|
| 29 |
FLEA::runMVC();
|
| 30 |
?> |