note 42138 added to function.exec

From: Date: Wed, 05 May 2004 02:37:20 +0000
Subject: note 42138 added to function.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-69217@lists.php.net to get a copy of this message
After tearing my hair out for eight hours, I finally figured out how to untar a file (yes, I know about fopen and sockets). You need to specify /bin/sh -c "command". For example: <?php exec('/bin/sh -c "/bin/tar -xzf /tmp/'.$filename.' install/desc-file install/info-file install/deps-file"'); ?> Note the quotes around the real command. Hope this helps somebody, --Taj ---- Manual Page -- http://www.php.net/manual/en/function.exec.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42138 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42138&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42138&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69217) next »