3

Can anyone help me with automating OpenVZ containers with PHP? I have tried some methods but couldn't make the shell commands work with PHP.

Following methods that I tried:

  1. Function like shell_exec(),exec() with and without sudo.

  2. Create a PHP script to execute vzlist and executed with cron jobs as root but no luck.

  3. Edited sudoers

  4. Tried this: Execute root commands via PHP but still it do not work when i open file php file that run php_shell.sh in browser.

Anyone have any ideas?

Community
  • 1
  • 1
Rishabh Jain
  • 110
  • 9

0 Answers0