php (rar) i want to rar a folder using rar on Ubuntu (linux) by php (on dedi server) noob
Posted
by Steve
on Stack Overflow
See other posts from Stack Overflow
or by Steve
Published on 2010-04-24T14:27:45Z
Indexed on
2010/04/24
14:33 UTC
Read the original article
Hit count: 319
hey guyz i want rar (not tar) my folder on my server by using php
RAR
RAR 3.93 Copyright (c) 1993-2010 Alexander Roshal 15 Mar 2010 Registered to my real name
OS
Ubuntu Release (Karmic) kernel linux 2.6.32.2-xxxx-grs-ipv4-32 Gnome 2.28.1
latest php an lighthttpd
i have tried these things
http://php.net/manual/en/function.escapeshellarg.php // may be wrong code
http://php.net/manual/en/function.exec.php
http://php.net/manual/en/function.shell-exec.php
my command (working in ssh and nautilus script)
rar a -m0 /where/file/will/saved/file_name.rar /location/ti/data/dir/datafolder
php code
$log=Shell_exec("rar a -m0 /where/file/will/saved/file_name.rar /location/ti/data/dir/datafolder");
echo $log;
one method is left which i don't know how to use and its working on server that is by somefile_to_execute_command.sh i have to execute .sh file from php need to send some variables (command) and
i tried this method can rar file with a script named RapidLeech but its rar from only its own files dir only :( but i want to do in different directories.
Rapid Leech rar class
http://paste2.org/p/791668
i m able run shell command with php (cp(copy),mv(move),ls(directory list),rm(remove aka delete)) but got failed to run rar i gives no output i also tried to given path rar and i used alot commands with php Shell_exec function and working like they work with ssh and i have tried almost 80 % method given on net and failed from last 3days i m over now plz help me i need php script file working plz reply if u have any info n code and experience about rar and this kinda :( problem
i m 99% noob just used code mean search Google collect script make my own working thing (for personal use only) n now i m failed to rar folder and file :((
now plz provide me code plz don't talk in technical language because i m just reading my first php book (for dummies :D) mean noob and 0.1
plz help me as much u can
thankx
© Stack Overflow or respective owner