Open abeersaeed opened 9 years ago
I am using Yii2 advance templete
Hi, did you added comand to command map in configuration?
Отправлено с моего Xiaomi
Сообщение от "abeersaeed notifications@github.com":
I am using Yii2 advance templete
— Reply to this email directly or view it on GitHub.
Yes i did
I added it in console/config/main
So, problem in configuration, i will think and let you know, you please too
Отправлено с моего Xiaomi
Сообщение от "abeersaeed notifications@github.com":
I added it in console/config/main
— Reply to this email directly or view it on GitHub.
yeah sure i am looking into it and please you also let me know Thanks
Can you look at all available yii command, is there yiinodesocket command?
Отправлено с моего Xiaomi
Сообщение от "abeersaeed notifications@github.com":
yeah sure i am looking into it and please you also let me know Thanks
— Reply to this email directly or view it on GitHub.
i tried to include it using Require in config now i am getting Unknown component Id
hi, can you show your configuration console/config/main.php?
Here It is
so, you set a wrong type to array_merge
require function can return some value from required file if in file used return statement array_merge used for merging arrays but in your case last require return nothing
you need to remove last require in array_merge statement and add node-socket configuration to components something like this only your configuration
'nodeSocket' => [
'class' => '\YiiNodeSocket\NodeSocket',
'host' => 'localhost',
'allowedServerAddresses' => [
"localhost",
"127.0.0.1"
],
'origin' => '*:*',
'sessionVarName' => 'PHPSESSID',
'port' => 3001,
'socketLogFile' => '/var/log/node-socket.log',
],
you can add nodeSocket to bootstrap
'bootstrap' => ['log', 'nodeSocket'],
oh ok let me try
Still it says
Unable to find \YiiNodeSocket\NodeSocket
So, read error message and check your syntax
Отправлено с моего Xiaomi
Сообщение от "abeersaeed notifications@github.com":
 Still it says
— Reply to this email directly or view it on GitHub.
I have fixed the above issue the main issue is not able to find \YiiNodeSocket\NodeSocketCommand which is the main class for Socket Command
do you have some errors? Is server starting?
if you used composer and include vendor/autoload.php into your project all should works
no server is not starting when i try to start the server by yii node-socket/start it throws error which i have shared with you
you need to check your configuration. NodeSocket extension must be configured like any other extension installed with composer
i do not know how i can help you with it because i do not see you project and etc...
I have followed all the steps you have mentioned but when i try to run the server using console it throws this error can you please check it and let me know. I have used your extension in Yii 1 now i want to use this in Yii 2 but i am stuck looking forward to listen from you Regards