Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-15-2007, 02:39 PM   #1
Registered: Apr 2006
Location: Portsmouth
Distribution: CentOS & Ubuntu
Posts: 49

Rep: Reputation: 15
Question System command from PHP


To cut a long story short i want to be able to run this "cd /root/Desktop ; tar xvf /tmp/backup"command from my php interface.

Ive tried:
shell_exec("cd /root/Desktop ; tar xvf /tmp/backup")

To create the file in /opt/lampp/htdocs, then try and run the file.
vi runme
#start of file
cd /root/Desktop ; tar xvf /tmp/backup
'end of file

ive tried to include the line in /etc/init.d/backup
but the sytnax i use doesnt seem to work.

Does anyone know of a way i can do this?

Thanks Rich
Old 05-16-2007, 10:15 AM   #2
Registered: May 2006
Location: India
Distribution: Redhat
Posts: 49

Rep: Reputation: 15
Whats the output/error ?? Try looking in http log files for errors.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find out if my system is i386, i486, or i586? Is there a system info command? mlsbraves Linux - General 6 02-17-2009 04:08 PM
list file system linux supports "please give the command or system call" varun_shrivastava Linux - General 4 01-09-2007 07:28 AM
PHP on the command line? kev000 Linux - General 4 11-28-2006 03:16 PM
php and a command ceph Programming 3 06-02-2006 05:46 AM
PHP executing System command abdul_zu Linux - General 4 12-28-2005 02:14 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration