Jump to content

help with shell_exec


herghost

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.