oncesk / yii-node-socket

66 stars 46 forks source link

Exec issue on hosting #88

Open dorw123 opened 7 years ago

dorw123 commented 7 years ago

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 ?

oncesk commented 7 years ago

Hey hey, of course proc_open

dorw123 commented 7 years ago

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?

oncesk commented 7 years ago

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

dorw123 commented 7 years ago

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?

oncesk commented 7 years ago

yes you can do it