Exception

千赢国际娱乐手机官网_千赢国际欢迎您_千赢国际老虎机

Redis server went away

  • 1. in /alidata/www/visa/common/components/RedisConnection.php at line 42
    33343536373839404142434445464748
            public $password='';
     
    	/**
    	 * Connect to redis
    	 */
    	public function getRedis() {
    		if ($this->_redis==null){
    			$this->_redis= new \Redis();
    			$this->_redis->connect($this->hostname,$this->port);
                            $this->_redis->auth($this->password);
    			$this->_redis->select($this->database);
    		}
    		return $this->_redis;
    	}
     
    }
    
  • 2. in /alidata/www/visa/common/components/RedisConnection.php at line 42 – Redis::auth('ruyu2016dbs')
    36373839404142434445464748
    	 * Connect to redis
    	 */
    	public function getRedis() {
    		if ($this->_redis==null){
    			$this->_redis= new \Redis();
    			$this->_redis->connect($this->hostname,$this->port);
                            $this->_redis->auth($this->password);
    			$this->_redis->select($this->database);
    		}
    		return $this->_redis;
    	}
     
    }
    
  • 3. in /alidata/www/visa/service/NewRegionService.php at line 154 – app\common\components\RedisConnection::getRedis()
    148149150151152153154155156157158159160
         * 如果redis里没有,先从数据库取并放入redis
     
         * @param $id  int
         * @return string name
         */
        public static function getRegionName($id) {
            $redis = Yii::$app->redisbag->getRedis();
            $hash = HASH_REGIONNAME_NEW;
            if ($redis->hExists($hash, $id)){
                $name = $redis->hGet($hash, $id);
            } else {
                //如果redis里没有,从数据库获取并放入redis
                $name = Region::findOne($id)->briefname;
    
  • 4. in /alidata/www/visa/service/NewRegionService.php at line 26 – app\service\NewRegionService::getRegionName(212339)
    20212223242526272829303132
         */
        public static function getCityInfo($citys)
        {
            $city_info = [];
            foreach ($citys as $city) {
                $city_info[$city->city_id]['id'] = $city->city_id;
                $city_info[$city->city_id]['name'] = self::getRegionName($city->city_id);
            }
            return $city_info;
        }
     
        /**
         * 获取某地域名称
    
  • 5. in /alidata/www/visa/modules/group/views/pc_v1/line/detail.php at line 85 – app\service\NewRegionService::getCityInfo([app\models\group\LineSourceCity])
    79808182838485868788899091
    				<div class="info_main_right">
    					<div class="case_mod">
    						<div class="case_item">
    							<?php
    							if (!empty($line->sourceCity)) {
    								// 出发地
    								$source_citys = NewRegionService::getCityInfo($line->sourceCity);
    								$citys = []; foreach ($source_citys as $source_city) $citys[] = $source_city['name'];
    							}
    							if (!empty($citys)) : 
    							?>
    							<span class="case_item_name">出发地&nbsp;&nbsp;|&nbsp;&nbsp;</span><?php echo implode('、', $citys);?></span>
    							<?php endif; ?>
    
  • 6. in /alidata/www/visa/vendor/yiisoft/yii2/base/View.php at line 325 – require('/alidata/www/visa/modules/group/...')
    319320321322323324325326327328329330331
         */
        public function renderPhpFile($_file_, $_params_ = [])
        {
            ob_start();
            ob_implicit_flush(false);
            extract($_params_, EXTR_OVERWRITE);
            require($_file_);
     
            return ob_get_clean();
        }
     
        /**
         * Renders dynamic content returned by the given PHP statements.
    
  • 7. in /alidata/www/visa/vendor/yiisoft/yii2/base/View.php at line 247 yii\base\View::renderPhpFile('/alidata/www/visa/modules/group/...', ['line' => app\models\group\Line, 'source' => 'ruyu'])
    241242243244245246247248249250251252253
                        $this->renderers[$ext] = Yii::createObject($this->renderers[$ext]);
                    }
                    /* @var $renderer ViewRenderer */
                    $renderer = $this->renderers[$ext];
                    $output = $renderer->render($this, $viewFile, $params);
                } else {
                    $output = $this->renderPhpFile($viewFile, $params);
                }
                $this->afterRender($viewFile, $params, $output);
            }
     
            array_pop($this->_viewFiles);
            $this->context = $oldContext;
    
  • 8. in /alidata/www/visa/vendor/yiisoft/yii2/base/View.php at line 149 yii\base\View::renderFile('/alidata/www/visa/modules/group/...', ['line' => app\models\group\Line, 'source' => 'ruyu'], app\modules\group\controllers\LineController)
    143144145146147148149150151152153154155
         * @throws InvalidParamException if the view cannot be resolved or the view file does not exist.
         * @see renderFile()
         */
        public function render($view, $params = [], $context = null)
        {
            $viewFile = $this->findViewFile($view, $context);
            return $this->renderFile($viewFile, $params, $context);
        }
     
        /**
         * Finds the view file based on the given view name.
         * @param string $view the view name or the path alias of the view file. Please refer to [[render()]]
         * on how to specify this parameter.
    
  • 9. in /alidata/www/visa/vendor/yiisoft/yii2/base/Controller.php at line 409 yii\base\View::render('/pc_v1/line/detail', ['line' => app\models\group\Line, 'source' => 'ruyu'], app\modules\group\controllers\LineController)
    403404405406407408409410411412413414415
         * @param array $params the parameters (name-value pairs) that should be made available in the view.
         * @return string the rendering result.
         * @throws InvalidParamException if the view file does not exist.
         */
        public function renderPartial($view, $params = [])
        {
            return $this->getView()->render($view, $params, $this);
        }
     
        /**
         * Renders a view file.
         * @param string $file the view file to be rendered. This can be either a file path or a path alias.
         * @param array $params the parameters (name-value pairs) that should be made available in the view.
    
  • 10. in /alidata/www/visa/modules/group/controllers/LineController.php at line 48 yii\base\Controller::renderPartial('/pc_v1/line/detail', ['line' => app\models\group\Line, 'source' => 'ruyu'])
    42434445464748495051525354
            // 这里PC需要调用 pc_v3_header,因为和其他头部不一样
            if (isset($_SERVER['HTTP_USER_AGENT']) && ($_SERVER['HTTP_USER_AGENT'] == 'ruyuapp' || $_SERVER['HTTP_USER_AGENT'] == 'ruyuapp_android')) {
                return $this->render(self::$tmpl_prefix . '/line/detail', $param);
            } else if ($detect->isMobile()) {
                return $this->render(self::$tmpl_prefix . '/line/detail', $param);
            } else {
                return $this->renderPartial(self::$tmpl_prefix . '/line/detail', $param);
            }
        }
     
        public function actionPost()
        {
            Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
    
  • 11. app\modules\group\controllers\LineController::actionDetail('G12988')
  • 12. in /alidata/www/visa/vendor/yiisoft/yii2/base/InlineAction.php at line 55 – call_user_func_array([app\modules\group\controllers\LineController, 'actionDetail'], ['G12988'])
    495051525354555657
            $args = $this->controller->bindActionParams($this, $params);
            Yii::trace('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__);
            if (Yii::$app->requestedParams === null) {
                Yii::$app->requestedParams = $args;
            }
     
            return call_user_func_array([$this->controller, $this->actionMethod], $args);
        }
    }
    
  • 13. in /alidata/www/visa/vendor/yiisoft/yii2/base/Controller.php at line 154 yii\base\InlineAction::runWithParams(['id' => 'G12988'])
    148149150151152153154155156157158159160
            }
     
            $result = null;
     
            if ($runAction && $this->beforeAction($action)) {
                // run the action
                $result = $action->runWithParams($params);
     
                $result = $this->afterAction($action, $result);
     
                // call afterAction on modules
                foreach ($modules as $module) {
                    /* @var $module Module */
    
  • 14. in /alidata/www/visa/vendor/yiisoft/yii2/base/Module.php at line 454 yii\base\Controller::runAction('detail', ['id' => 'G12988'])
    448449450451452453454455456457458459460
            $parts = $this->createController($route);
            if (is_array($parts)) {
                /* @var $controller Controller */
                list($controller, $actionID) = $parts;
                $oldController = Yii::$app->controller;
                Yii::$app->controller = $controller;
                $result = $controller->runAction($actionID, $params);
                Yii::$app->controller = $oldController;
     
                return $result;
            } else {
                $id = $this->getUniqueId();
                throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
    
  • 15. in /alidata/www/visa/vendor/yiisoft/yii2/web/Application.php at line 84 yii\base\Module::runAction('group/line/detail', ['id' => 'G12988'])
    78798081828384858687888990
                $params = $this->catchAll;
                unset($params[0]);
            }
            try {
                Yii::trace("Route requested: '$route'", __METHOD__);
                $this->requestedRoute = $route;
                $result = $this->runAction($route, $params);
                if ($result instanceof Response) {
                    return $result;
                } else {
                    $response = $this->getResponse();
                    if ($result !== null) {
                        $response->data = $result;
    
  • 16. in /alidata/www/visa/vendor/yiisoft/yii2/base/Application.php at line 375 yii\web\Application::handleRequest(yii\web\Request)
    369370371372373374375376377378379380381
            try {
     
                $this->state = self::STATE_BEFORE_REQUEST;
                $this->trigger(self::EVENT_BEFORE_REQUEST);
     
                $this->state = self::STATE_HANDLING_REQUEST;
                $response = $this->handleRequest($this->getRequest());
     
                $this->state = self::STATE_AFTER_REQUEST;
                $this->trigger(self::EVENT_AFTER_REQUEST);
     
                $this->state = self::STATE_SENDING_RESPONSE;
                $response->send();
    
  • 17. in /alidata/www/visa/web/index.php at line 18 yii\base\Application::run()
    12131415161718
     
    require(__DIR__ . '/../vendor/autoload.php');
    require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');
     
    $config = require(__DIR__ . '/../config/web.php');
     
    (new yii\web\Application($config))->run();
    
  • $_GET = [
        'id' => 'G12988',
    ];