We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a hostgator shared account. In my .bashrc i have:
alias php='/opt/php71/bin/php' alias composer='/home/XXX/bin/composer.phar'
In webconsole, when I try to run:
php -v
I got:
Content-Type: application/json Access-Control-Allow-Origin: * Access-Control-Allow-Headers: x-requested-with, content-type {"jsonrpc":"2.0","id":null,"error":{"code":-32700,"message":"Parse error","data":null}}
or when I try to run:
composer -v
sh: composer: command not found
The text was updated successfully, but these errors were encountered:
I must to do that in function "execute_command":
// Command execution function execute_command($command) { $descriptors = array( 0 => array('pipe', 'r'), // STDIN 1 => array('pipe', 'w'), // STDOUT 2 => array('pipe', 'w') // STDERR ); $preCommand = [ 'export HOME=/home/XXX' ]; $commands = [ 'php' => '/opt/php71/bin/php', 'composer.phar' => '/opt/php71/bin/php /home/XXX/bin/composer.phar', 'composer' => '/opt/php71/bin/php /home/XXX/bin/composer.phar', ]; foreach ($commands as $key => $cmd) { $command = preg_replace('/(^|\s)('.$key.')($|\s)/i', '$1'.$cmd.'$3', $command); } $preCommand = implode(' && ', $preCommand).' && '; $process = proc_open($preCommand.$command . ' 2>&1', $descriptors, $pipes); if (!is_resource($process)) die("Can't execute command."); // Nothing to push to STDIN fclose($pipes[0]); $output = stream_get_contents($pipes[1]); fclose($pipes[1]); $error = stream_get_contents($pipes[2]); fclose($pipes[2]); // All pipes must be closed before "proc_close" $code = proc_close($process); return $output; }
Sorry, something went wrong.
No branches or pull requests
I have a hostgator shared account.
In my .bashrc i have:
In webconsole, when I try to run:
I got:
or when I try to run:
I got:
The text was updated successfully, but these errors were encountered: