nickola / web-console

:desktop_computer: Simple web-based shell in your browser (outdated)
https://nickola.ru/projects/web-console
1.55k stars 350 forks source link

proc_open() has been disabled for security reasons #23

Open ntaloventi opened 7 years ago

ntaloventi commented 7 years ago

how do i fixed this in shared hosting?

balaji-premkumar commented 7 years ago

am also facing this same issue in my hosting side..

scanzy commented 7 years ago

Go to line 557 and replace function execute_command with this:

// Command execution
function execute_command($command) {
    exec($command.' 2>&1', $output);
    return implode(PHP_EOL, $output);
}

If you find this helpful I can create a pull request

ectatomma commented 6 years ago

@scanzy I just tried your suggestion (I'm facing [ERROR] AJAX: Invalid JSON referenced in issue #30). Now I don't have any error message, but the only command I can run is cd, all other commands looks like are not executed.

scanzy commented 6 years ago

Well, my solution was just a simple workaround, actually I don't know how 2>&1 works, I saw it somewhere, made a test and it worked. Now I have no idea why this is not working anymore :( You could try my workaround using code from every commit from 4 months ago to the latest commit, and see which commit contains the "problem"

WJie12 commented 4 years ago

Hi, I suppose the problem is the setting of php. You can motify the php.ini file. Find disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_get_status,proc_open,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server and comment it. It works for me :)