Re: ZIP it :o)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, June 1, 2007 12:30 am, Auto-Deppe, C. Haensel wrote:
> Morning guys,
>
> I have been trying to find an easy to use way to zip an archive on a
> linux
> box running PHP5. Now I've tried the zip-lib.php and others, but they
> always
> throw an error msg.... But that is not the question.
>
> I am looking to use exec("zip archive.zip $directory");  $directory
> has been
> tried with both full path and relative path ... but that doesn't work.
> I
> don't get an error, it just doesn't create the zip-file...
>
> So, after a day of Google-ing and trying, I thought I might ask you
> for
> help.
>
> Cheers for any answers and hints.

HINT:
I'd love to alter the PHP source so that the 2 optional args to exec()
are NOT optional anymore...

It would forestall a lot of 'exec' questions on this list... :-)

Use full paths everywhere, or you'll end up cursing again some other
day.  That includes the full path to the binary program 'zip' and the
file 'archive.zip' and the '$directory'

You also MUST understand that PHP runs as a specific user, which on
Apache is defined in httpd.conf, and is rarely the same user as your
SSH login user.  So what you can do in the command line has little
bearing on what that user can do in 'exec'

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux