Try just specifying the path....
system("tar -xvf /home/httpd/html/file.tar
/home/httpd/html/filedirectory/.");
Let me know if this helps.
Brian Drexler
----- Original Message -----
From: Brandon Orther <[EMAIL PROTECTED]>
To: PHP User Group <[EMAIL PROTECTED]>
Sent: Friday, February 16, 2001 7:10 PM
Subject: RE: [PHP] using tar to untar a file into a certain dir... In php of
course
> Hello,
>
> I can't seem to get cd to work while using system???? I even use the whole
> root path.
>
> Anyone got any ideas?
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
> -----Original Message-----
> From: Javier Muniz [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 16, 2001 2:48 PM
> To: 'DanO'; Brandon Orther; PHP User Group
> Subject: RE: [PHP] using tar to untar a file into a certain dir... In
> php of course
>
>
> Don't calls to system() live within their own shell and environment? If
so
> you may need to:
>
> system("cd /destination/dir && tar -xpf /some/path/to/tarfile.tar");
>
> this will also insure that if the cd fails for some reason, tar will not
> execute.
>
> -jm
>
> -----Original Message-----
> From: DanO [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 16, 2001 2:34 PM
> To: Brandon Orther; PHP User Group
> Subject: RE: [PHP] using tar to untar a file into a certain dir... In
> php of course
>
>
>
> good point. i should think before i post.
>
> here is another go:
>
> <?
> chdir("destination");
> system("tar -xpf /some/path/to/mytar.tar");
> ?>
>
> i can't test this as i am on a windows box at the moment, but i think you
> can get the gist of it.
>
> change the working directory of php and then extract from another file.
>
> DanO
>
>
>
> -----Original Message-----
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 16, 2001 2:16 PM
> To: PHP User Group
> Subject: FW: [PHP] using tar to untar a file into a certain dir... In
> php of course
>
>
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 16, 2001 2:07 PM
> To: DanO
> Subject: RE: [PHP] using tar to untar a file into a certain dir... In
> php of course
>
>
> That just untars it into the current dir the php script is in.
>
> -----Original Message-----
> From: DanO [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 16, 2001 1:58 PM
> To: PHP User Group
> Subject: RE: [PHP] using tar to untar a file into a certain dir... In
> php of course
>
>
>
> have you tried:
>
> mv mytar.tar /my/path/to/dir/; tar -xpf /my/path/to/dir/mytar.tar
>
> this should work, but there may be a more direct unix-y way to do it.
>
> DanO
>
>
> -----Original Message-----
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 16, 2001 1:49 PM
> To: PHP User Group
> Subject: [PHP] using tar to untar a file into a certain dir... In php of
> course
>
>
> Hello,
>
> I am making a php file that untars files. What I can't seem to figure out
> is how to untar a file into another folder. I have tried:
>
> tar -xpf file.tar /new/folder/*
>
> & and &
>
> tar -xpf file.tar /new/folder/
>
>
> does anyone know how to do this?
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]