I have a problem when you run a script from php the problem is that it doesn't do what must be done, this is the php code
? php
echo "starting execution";
echo exec("./sc");
?>
and in the code of the script this is sc
mv text.txt /var/www/files/
does not work does not move the file archive there is I've added the chmod permismos but doesn't appreciate any suggestion
First, I would suggest to execute the script file manually from command line(console) and check if the script file is working properly. If that doesn't work, then it won't work in php too.
Try:
echo "starting execution";
echo exec("./sc", $output);
var_dump($output);
contents of sc :
mv text.txt /var/www/files/ 2>&1
If the file is not moved, it must throw an error which you should be able to see in $output
.
My guess would be that the error must be related to permission.