LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 15
Question System command from PHP


HI,

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
shell_exec("/opt/lampp/htdocs/runme");

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, 11:15 AM   #2
debulu
Member
 
Registered: May 2006
Location: India
Distribution: Redhat
Posts: 49

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


Reply


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 05:08 PM
list file system linux supports "please give the command or system call" varun_shrivastava Linux - General 4 01-09-2007 08:28 AM
PHP on the command line? kev000 Linux - General 4 11-28-2006 04:16 PM
php and a command ceph Programming 3 06-02-2006 06:46 AM
PHP executing System command abdul_zu Linux - General 4 12-28-2005 03:14 PM


All times are GMT -5. The time now is 06:18 AM.

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