Answer the question
In order to leave comments, you need to log in
Yii debug panel not connecting, how to fix the error?
I connect debug through composer, in the config I write
<?php
return [
'id' => 'school',
'basePath' => realpath( __DIR__ . '/../'),
'bootstrap' => [
'debug'
],
'components' => [
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false
],
'request' => [
'cookieValidationKey' => 'super secret code'
]
],
'modules' => [
'debug' => [
'class' => 'yii\debug\Module',
'allowedIPs' => ['*']
]
]
];
?>
Answer the question
In order to leave comments, you need to log in
Your problem is most likely with urlManager or htaccess if you are using Apache. The error is 404. This means that such a page does not exist. Set these two items as required. If there are other errors - write.
It is hardly relevant, but for those who get to this page with the same problem.
Try adding a require __DIR__ line to web/index.php . '/../vendor/autoload.php';
I searched the Internet all day - I didn’t find it, as a result I compared the configs on the framework with the pre-installed debugger and my own and found such a difference.
My config
<?php
//Включает дебагер YII
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
require __DIR__ . '/../vendor/autoload.php';
require __DIR__.'/../vendor/yiisoft/yii2/Yii.php';
$config = require __DIR__.'/../config/web.php';
(new yii\web\Application($config))->run();
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question