yii-node-socket icon indicating copy to clipboard operation
yii-node-socket copied to clipboard

Exec issue on hosting

Open dorw123 opened this issue 7 years ago • 5 comments

In your yii-node-socket/lib/php/console/UnixConsole.php you use exec comand. For security reasons exec() command is disabled and also shell_exec() and system(). Is there any alternative I can use ?

dorw123 avatar Oct 06 '17 08:10 dorw123

Hey hey, of course proc_open

oncesk avatar Oct 06 '17 08:10 oncesk

the proc_open command is also disabled and all the execution commands ran from php. Is there any solution to start the server outside php? Could you provide some info please?

dorw123 avatar Oct 06 '17 09:10 dorw123

so, just go through the code and look what is going on, which command you should execute

as i remember you need generate configuration and then can start nodejs manually from console, as i see you can run start and compilation should be done after that you can start nodejs manually

node lib/js/server/server.js

oncesk avatar Oct 06 '17 09:10 oncesk

So, Im thinking to make a script that runs node-socket/start on system startup Im going to delete the exec() stuff. And after node-socket/start I should make a startup script that executes node lib/js/server/server.js?

dorw123 avatar Oct 06 '17 09:10 dorw123

yes you can do it

oncesk avatar Oct 06 '17 09:10 oncesk