•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 423,365 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 5,025 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2143 | Replies: 35
![]() |
•
•
Join Date: Dec 2007
Location: Bangalore,India
Posts: 118
Reputation:
Rep Power: 1
Solved Threads: 1
hi,
i am runnning a php script where i try to decompress a file and the untar it.
the file in suppose x.tar.gz. so in my php script i call system command
system("gunzip /home/trial/x.tar.gz");
now to untar i use
system("tar xvf /home/trial/x.tar");
now the error creeps in. i am able to decompress the file i.e in /home/trial/x.tar is formed but when i try to untar it the result in shown in the webpage(running the php script) instead of untaring it in the /home/trial folder).
can anyone help?
i am runnning a php script where i try to decompress a file and the untar it.
the file in suppose x.tar.gz. so in my php script i call system command
system("gunzip /home/trial/x.tar.gz");
now to untar i use
system("tar xvf /home/trial/x.tar");
now the error creeps in. i am able to decompress the file i.e in /home/trial/x.tar is formed but when i try to untar it the result in shown in the webpage(running the php script) instead of untaring it in the /home/trial folder).
can anyone help?
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
umm.. I am not sure about this. But shouldn't
system("tar xvf /home/trial/x.tar"); be system("tar xvf /home/trial/x.tar.gz"); ? Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 240
Oh thanks.. Umm.. so the OP should use zxvf since he/she is creating a tar.gz file ?
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Dec 2007
Location: Bangalore,India
Posts: 118
Reputation:
Rep Power: 1
Solved Threads: 1
•
•
Join Date: Dec 2007
Location: Bangalore,India
Posts: 118
Reputation:
Rep Power: 1
Solved Threads: 1
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: PHP and MYSQL table formatting
- Next Thread: Code check for email



Linear Mode