web-console icon indicating copy to clipboard operation
web-console copied to clipboard

proc_open() has been disabled for security reasons

Open ntaloventi opened this issue 7 years ago • 5 comments

how do i fixed this in shared hosting?

ntaloventi avatar Mar 03 '17 14:03 ntaloventi

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

balaji-premkumar avatar May 18 '17 09:05 balaji-premkumar

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

scanzy avatar Sep 17 '17 21:09 scanzy

@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.

ectatomma avatar Jan 28 '18 14:01 ectatomma

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"

scanzy avatar Jan 28 '18 15:01 scanzy

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 :)

WJie12 avatar May 13 '20 00:05 WJie12