I need to run a python script before which I need to activate a virtual env for the script to run and it is in root folder. This is the command to do that (without using source command)
exec(root/Envs/ate/bin/python /var/www/cgi-bin/TStool/box_upgrade.py).
how do I execute from apache. I get 126 error in php. I have given the actual path.
126 error means- "Command invoked cannot execute. A permission or command not executable problem.".
How do I do this. The actual path is in the root folder, I can't move it to outside of root.
<?php
$op=exec('/root/Envs/ate/bin/python /var/www/cgi-bin/TStool /box_upgrade.py',$output,$return);
echo "Dir returned $return, and output:\n";
var_dump($output);
echo $return;
echo $op;
?>
Any suggestions? Thanks.
/root/directory.