0
I made a list of commands to be executed on the server using php, which was as follows
echo shell_exec("sudo mkdir teste");
echo shell_exec("sudo chown apache:ind teste/");
echo shell_exec("sudo unzip image.zip -d teste/");
Running directly on the server with the command
sudo php -f teste.php
Everything that is inside the document runs, but if I try to run through the browser, for example
www.minhaurl.com/teste.php
Goes in the
php.ini
and looks for the linedisable_functions
, remove from the list theshell_exec
.– Augusto Vasques
No Rolou, still not running :/
– Yuri Rodrigues
I found this here https://stackoverflow.com/a/38523143/11379709 says you should add a rule so sudo doesn’t ask for the password for the page.
– Augusto Vasques
I guess it didn’t work either :/ How boring this is
– Yuri Rodrigues
How you are restarting the server after the changes?
– MagicHat
sudo service named Restart, it worked the update, because I can no longer run by pronpt, but even so, it does not work by browser :(
– Yuri Rodrigues