Hi,出错了!

SQLSTATE[HY000] [2002] No such file or directory

错误位置

/www/wwwroot/775436.net/ptcms/driver/db/mysql/pdo.php  LINE: 40

33      * 用于初始化运行环境,或对基本变量进行赋值
34      *
35      * @param array $params 数据库连接参数,如主机名,数据库用户名,密码等
36      */
37     public function __construct($params = array()) {
38         //连接数据库 ,PDO::ATTR_PERSISTENT => true
39         $params['charset']=empty($params['charset'])?'utf8':$params['charset'];
40         $this->db_link = @new PDO("mysql:host={$params['host']};port={$params['port']};dbname={$params['name']}", $params['user'], $params['pwd'], array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES {$params['charset']}"));
41         if (!$this->db_link) {
42             trigger_error($params['driver'] . ' Server connect fail! <br/>Error Message:' . $this->error() . '<br/>Error Code:' . $this->errno(), E_USER_ERROR);
43         }
44         return true;
45     }
46 
47     /**
TRACE
#0  include() called at [/www/wwwroot/775436.net/ptcms/function.php:50]
#1  halt(SQLSTATE[HY000] [2002] No such file or directory, /www/wwwroot/775436.net/ptcms/driver/db/mysql/pdo.php, 40) called at [/www/wwwroot/775436.net/ptcms/core/pt.php:229]
#2  pt::exception(PDOException Object ([] => SQLSTATE[HY000] [2002] No such file or directory,[] => ,[] => 2002,[] => /www/wwwroot/775436.net/ptcms/driver/db/mysql/pdo.php,[] => 40,[] => Array ([0] => Array ([file] => /www/wwwroot/775436.net/ptcms/driver/db/mysql/pdo.php,[line] => 40,[function] => __construct,[class] => PDO,[type] => ->,[args] => Array ([0] => mysql:host=localhost;port=3306;dbname=sql_775436_net,[1] => sql_775436_net,[2] => l9OyxWX9,[3] => Array ([1002] => SET NAMES utf8))),[1] => Array ([file] => /www/wwwroot/775436.net/ptcms/driver/db/dao.php,[line] => 256,[function] => __construct,[class] => Driver_Db_Mysql_Pdo,[type] => ->,[args] => Array ([0] => Array ([host] => localhost,[port] => 3306,[name] => sql_775436_net,[user] => sql_775436_net,[pwd] => l9OyxWX9,[charset] => utf8))),[2] => Array ([file] => /www/wwwroot/775436.net/ptcms/driver/db/dao.php,[line] => 271,[function] => slave,[class] => Driver_Db_Dao,[type] => ->,[args] => Array ()),[3] => Array ([file] => /www/wwwroot/775436.net/ptcms/driver/db/dao.php,[line] => 227,[function] => getTableField,[class] => Driver_Db_Dao,[type] => ->,[args] => Array ()),[4] => Array ([file] => /www/wwwroot/775436.net/ptcms/driver/db/dao.php,[line] => 111,[function] => setTable,[class] => Driver_Db_Dao,[type] => ->,[args] => Array ([0] => Author)),[5] => Array ([file] => /www/wwwroot/775436.net/ptcms/core/db.php,[line] => 28,[function] => __construct,[class] => Driver_Db_Dao,[type] => ->,[args] => Array ([0] => Array ([type] => mysql,[master] => Array ([0] => Array ([host] => localhost,[port] => 3306,[name] => sql_775436_net,[user] => sql_775436_net,[pwd] => l9OyxWX9)),[singleton] => 1,[slave] => Array ([0] => Array ([host] => localhost,[port] => 3306,[name] => sql_775436_net,[user] => sql_775436_net,[pwd] => l9OyxWX9)),[driver] => pdo,[prefix] => ptcms_,[charset] => utf8),[1] => Author)),[6] => Array ([file] => /www/wwwroot/775436.net/ptcms/core/base.php,[line] => 86,[function] => getInstance,[class] => PT_Db,[type] => ->,[args] => Array ([0] => Author)),[7] => Array ([file] => /www/wwwroot/775436.net/ptcms/core/model.php,[line] => 70,[function] => db,[class] => PT_Base,[type] => ->,[args] => Array ([0] => Author)),[8] => Array ([file] => /www/wwwroot/775436.net/application/novelsearch/controller/novel.php,[line] => 2,[function] => __call,[class] => PT_Model,[type] => ->,[args] => Array ([0] => where,[1] => Array ([0] => Array ([pinyin] => xiangbuxiangchixigua)))),[9] => Array ([file] => /www/wwwroot/775436.net/application/novelsearch/controller/novel.php,[line] => 2,[function] => where,[class] => AuthorModel,[type] => ->,[args] => Array ([0] => Array ([pinyin] => xiangbuxiangchixigua))),[10] => Array ([file] => /www/wwwroot/775436.net/ptcms/core/pt.php,[line] => 91,[function] => authorAction,[class] => novelController,[type] => ->,[args] => Array ()),[11] => Array ([file] => /www/wwwroot/775436.net/ptcms/core/pt.php,[line] => 33,[function] => app,[class] => pt,[type] => ->,[args] => Array ()),[12] => Array ([file] => /www/wwwroot/775436.net/ptcms/ptcms.php,[line] => 170,[function] => start,[class] => pt,[type] => ->,[args] => Array ()),[13] => Array ([file] => /www/wwwroot/775436.net/index.php,[line] => 20,[args] => Array ([0] => /www/wwwroot/775436.net/ptcms/ptcms.php),[function] => include)),[] => ,[errorInfo] => ))
文件加载
/www/wwwroot/775436.net/index.php
/www/wwwroot/775436.net/ptcms/ptcms.php
/www/wwwroot/775436.net/ptcms/function.php
/www/wwwroot/775436.net/ptcms/core/base.php
/www/wwwroot/775436.net/ptcms/core/pt.php
/www/wwwroot/775436.net/ptcms/core/config.php
/www/wwwroot/775436.net/application/common/config.php
/www/wwwroot/775436.net/ptcms/core/plugin.php
/www/wwwroot/775436.net/ptcms/core/request.php
/www/wwwroot/775436.net/ptcms/core/dispatcher.php
/www/wwwroot/775436.net/application/common/function.php
/www/wwwroot/775436.net/application/novelsearch/controller/novel.php
/www/wwwroot/775436.net/application/common/controller/common.php
/www/wwwroot/775436.net/ptcms/core/controller.php
/www/wwwroot/775436.net/application/user/model/user.php
/www/wwwroot/775436.net/ptcms/core/model.php
/www/wwwroot/775436.net/ptcms/core/cookie.php
/www/wwwroot/775436.net/ptcms/core/view.php
/www/wwwroot/775436.net/template/default/config.php
/www/wwwroot/775436.net/application/cron/model/cron.php
/www/wwwroot/775436.net/ptcms/core/cache.php
/www/wwwroot/775436.net/ptcms/driver/cache/file.php
/www/wwwroot/775436.net/application/author/model/author.php
/www/wwwroot/775436.net/ptcms/core/input.php
/www/wwwroot/775436.net/ptcms/core/filter.php
/www/wwwroot/775436.net/ptcms/core/db.php
/www/wwwroot/775436.net/ptcms/driver/db/mysql/dao.php
/www/wwwroot/775436.net/ptcms/driver/db/dao.php
/www/wwwroot/775436.net/ptcms/driver/db/mysql/pdo.php
/www/wwwroot/775436.net/ptcms/core/response.php
/www/wwwroot/775436.net/ptcms/error.tpl