herghost Posted March 25, 2012 Share Posted March 25, 2012 Hi Guys I cant seem to get unzip to work via php shell_exec this is what I have: $rworld = $_GET['restore']; $connect->call('remotetoolkit.stopServer',Array()); sleep(12); $nrworld = substr($rworld, 0,-15); $sftp = new Net_SFTP($host); $sftp->login($root_user, $root_pass); $sftp->delete('/root/minecraft/'.$nrworld.'/', true); echo shell_exec("unzip -jo /root/minecraft/saves/$rworld -d /root/minecraft/$nrworld"); sleep(5); $connect->call('remotetoolkit.startServer',Array()); Nothing is returned, it doesn't echo and the command is not executed. If I execute via terminal and change the $variables to the actual names it works fine, and I can ls with shell_exec successfully? Any ideas? Link to comment https://forums.phpfreaks.com/topic/259708-help-with-shell_exec/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.