help me

in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\db\Connection.php at line 584

575576577578579580581582583584585586587588589590591592593





        $token = 'Opening DB connection: ' . $this->dsn;


        try {


            Yii::info($token, __METHOD__);


            Yii::beginProfile($token, __METHOD__);


            $this->pdo = $this->createPdoInstance();


            $this->initConnection();


            Yii::endProfile($token, __METHOD__);


        } catch (\PDOException $e) {


            Yii::endProfile($token, __METHOD__);


            throw new Exception($e->getMessage(), $e->errorInfo, (int) $e->getCode(), $e);


        }


    }


 


    /**


     * Closes the currently active DB connection.


     * It does nothing if the connection is already closed.


     */


    public function close()


    {





2. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\db\Connection.php at line 928 – yii\db\Connection::open()


3. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\db\Connection.php at line 915 – yii\db\Connection::getMasterPdo()


4. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\db\Command.php at line 219 – yii\db\Connection::getSlavePdo()


5. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\db\Command.php at line 910 – yii\db\Command::prepare(true)


6. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\db\Command.php at line 362 – yii\db\Command::queryInternal('fetchAll', null)


7. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\db\Query.php at line 213 – yii\db\Command::queryAll()


8. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\db\ActiveQuery.php at line 135 – yii\db\Query::all(null)


9. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\controllers\UsersController.php at line 15 – yii\db\ActiveQuery::all()


9101112131415161718





use yii\web\Controller;


use app\models\Users;


class UsersController extends Controller


{


    public function actionIndex()


    {


        $users = Users::find()->all();


        print_r($users);


    }


}





10. app\controllers\UsersController::actionIndex()


11. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\base\InlineAction.php at line 57 – call_user_func_array([app\controllers\UsersController, 'actionIndex'], [])


12. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\base\Controller.php at line 156 – yii\base\InlineAction::runWithParams(['r' => 'users/index'])


13. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\base\Module.php at line 523 – yii\base\Controller::runAction('index', ['r' => 'users/index'])


14. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\web\Application.php at line 102 – yii\base\Module::runAction('users/index', ['r' => 'users/index'])


15. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\vendor\yiisoft\yii2\base\Application.php at line 380 – yii\web\Application::handleRequest(yii\web\Request)


16. in C:\xampp\htdocs\project\yii-basic-app-2.0.12\basic\web\index.php at line 12 – yii\base\Application::run()


6789101112





 


require(__DIR__ . '/../vendor/autoload.php');


require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php');


 


$config = require(__DIR__ . '/../config/web.php');


 


(new yii\web\Application($config))->run();

[color="#556B2F"]/* Moved from "General Discussions" to "Installation and Setup" */[/color]

Check your db configuration.