You are here: Re: Can anyone tell me why this doesnt work please « PHP Programming Language « IT news, forums, messages
Re: Can anyone tell me why this doesnt work please

Posted by Andy Hassall on 12/16/42 11:57

On Wed, 06 Sep 2006 16:37:35 GMT, nigel.t@by.uk wrote:

>In article <BNudneEBxth0dmPZnZ2dnUVZ_rmdnZ2d@comcast.com>,
>jstucklex@attglobal.net says...
>> nigel.t@by.uk wrote:
>> > Using linux
>> >
>> > <?php
>> > exec("/bin/tar -cvzf myfile.tgz /home/",$arrayout,$returnval);
>> > ?>
>> > <?php
>> > exec("/bin/tar -c * \| gzip \> myfile.tgz",$arrayout,$returnval);
>> > ?>
>> >
>> > Both work fine from the command line neither work at all from PHP
>>
>> What kind of error do you get?
>
>Hi Jerry - $returnval contains '2' in each case.
>$arrayout never seems to contain anything.
>
>I can however do -
>tar --help
>which does return the help.
>
>I've also tried to archive a single file with the same result
>ie. tar -cf myfile.tar foo
>returns an error of 2
>
>and i've tried the --ignore-failed-read flag to no avail.

errno 2 is "No such file or directory" - so I'm not quite sure what to make of
that; permission denied would seem more likely.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация