Open Sirgalas opened 8 years ago
Hello, please check your configuration, both web app- configuration and console app
console/config/main.php
return [
'id' => 'app-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'console\controllers',
'controllerMap' => [
'node-socket' => '\YiiNodeSocket\NodeSocketCommand',
],
'components' => [
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
],
'modules' => [
'rbac' => 'dektrium\rbac\RbacConsoleModule',
],
'params' => $params,
];
frontend/config/main
'components' => [
'request' => [
'csrfParam' => '_csrf-frontend',
],
'user' => [
'identityCookie' => [
'name' => '_frontendIdentity',
'path' => '/',
'httpOnly' => true,
],
],
'session' => [
'name' => 'FRONTENDSESSID',
'cookieParams' => [
'httpOnly' => true,
'path' => '/',
],
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
],
],
'nodeSocket' => [
'class' => '\YiiNodeSocket\NodeSocket',
'host' => 'localhost',
'allowedServerAddresses' => [
"localhost",
"127.0.0.1"
],
'origin' => '*:*',
'sessionVarName' => 'PHPSESSID',
'port' => 3001,
'socketLogFile' => '/var/log/node-socket.log',
],
],
do not tell me where there may be a mistake
Ok, sure :)
please nothing just does not work. :)
You should add
''' 'nodeSocket' => [ 'class' => '\YiiNodeSocket\NodeSocket', 'host' => 'localhost', 'allowedServerAddresses' => [ "localhost", "127.0.0.1" ], 'origin' => ':', 'sessionVarName' => 'PHPSESSID', 'port' => 3001, 'socketLogFile' => '/var/log/node-socket.log', ], '''
into your console configuration in components section
thank you very much , you're the best. Good for you
Вот собствено сама ошибка