Re: [PHP-DB] Problem in executing linux command from PHP

2003-09-10 Thread Gnanavel

- Original Message -
From: Sean Burlington [EMAIL PROTECTED]
Newsgroups: php.db
To: [EMAIL PROTECTED]
Sent: Sunday, September 07, 2003 3:26 PM
Subject: Re: [PHP-DB] Problem in executing linux command from PHP


 Gnanavel wrote:
 $output=exec(cp file1 file2);
 echo pre$output/pre;
 
 does not works. can any one help me out of this problem
 
 When I was executing the cp command it doesn't return anything.
 But it returned the name of the last file when i executed the ls
 

 
 `cp file1 file2` doesn't return anything - so your script probably is
 working as it correctly returns nothing.
 

 
  Thanks for help
  The problem is the file is not copied to destination folder. I
experience
  the problem for all file modification commands like mv etc..
  I am unable run a shell script file from php which contains file
  modification commands.
 

 the scripts are probably running as a user with insufficient rights to
 perform those operations

 to find out which user you are running as try

 ?php echo `whoami`; ?

 --

 Sean

 Thanks for  help.
Now it works.

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



Re: [PHP-DB] Problem in executing linux command from PHP

2003-09-07 Thread Sean Burlington
Gnanavel wrote:
$output=exec(cp file1 file2);
echo pre$output/pre;
does not works. can any one help me out of this problem

When I was executing the cp command it doesn't return anything.
But it returned the name of the last file when i executed the ls


`cp file1 file2` doesn't return anything - so your script probably is
working as it correctly returns nothing.

Thanks for help
The problem is the file is not copied to destination folder. I experience
the problem for all file modification commands like mv etc..
I am unable run a shell script file from php which contains file
modification commands.
the scripts are probably running as a user with insufficient rights to 
perform those operations

to find out which user you are running as try

?php echo `whoami`; ?

--

Sean

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


Re: [PHP-DB] Problem in executing linux command from PHP

2003-09-06 Thread Gnanavel

- Original Message -
From: Sean Burlington [EMAIL PROTECTED]
Newsgroups: php.db
To: [EMAIL PROTECTED]
Sent: Tuesday, September 02, 2003 1:11 PM
Subject: Re: [PHP-DB] Problem in executing linux command from PHP


 Gnanavel wrote:
  I have problem in executing  linux command
  $output=exec(ls -a);
  echo pre$output/pre;
 
  the above coding works, but
 
  $output=exec(cp file1 file2);
  echo pre$output/pre;
 
  does not works. can any one help me out of this problem
 
  When I was executing the cp command it doesn't return anything.
  But it returned the name of the last file when i executed the ls
command
 

 try it on the command line ..

 `cp file1 file2` doesn't return anything - so your script probably is
 working as it correctly returns nothing.

 if you want to see output try

 `cp -v file1 file2`

 --


Thanks for help
The problem is the file is not copied to destination folder. I experience
the problem for all file modification commands like mv etc..
I am unable run a shell script file from php which contains file
modification commands.

 Sean

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



Re: [PHP-DB] Problem in executing linux command from PHP

2003-09-02 Thread Gnanavel
I have problem in executing  linux command
$output=exec(ls -a);
echo pre$output/pre;

the above coding works, but

$output=exec(cp file1 file2);
echo pre$output/pre;

does not works. can any one help me out of this problem

When I was executing the cp command it doesn't return anything. 
But it returned the name of the last file when i executed the ls command



-
Sify Mail - now with Anti-virus protection powered by Trend Micro, USA.
Know more at http://mail.sify.com

Sify Power mail- a Premium Service from Sify Mail!
know more at http://mail.sify.com

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



Re: [PHP-DB] Problem in executing linux command from PHP

2003-09-02 Thread Sean Burlington
Gnanavel wrote:
I have problem in executing  linux command
$output=exec(ls -a);
echo pre$output/pre;
the above coding works, but

$output=exec(cp file1 file2);
echo pre$output/pre;
does not works. can any one help me out of this problem

When I was executing the cp command it doesn't return anything. 
But it returned the name of the last file when i executed the ls command

try it on the command line ..

`cp file1 file2` doesn't return anything - so your script probably is 
working as it correctly returns nothing.

if you want to see output try

`cp -v file1 file2`

--

Sean

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


Re: [PHP-DB] Problem in executing linux command from PHP

2003-09-02 Thread David Smith
Gnanavel wrote:

I have problem in executing  linux command
$output=exec(ls -a);
echo pre$output/pre;
the above coding works, but

$output=exec(cp file1 file2);
echo pre$output/pre;
does not works. can any one help me out of this problem

When I was executing the cp command it doesn't return anything. 
But it returned the name of the last file when i executed the ls command

cp does not return anything on the command line on success.

--Dave

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


Re: [PHP-DB] Problem in executing linux command from PHP

2003-08-29 Thread Gnanavel
Quoting  [EMAIL PROTECTED]:

 From: Gnanavel [EMAIL PROTECTED]
 
 
  I have problem in executing  linux command
 
  $output=exec(ls -a);
  echo pre$output/pre;
 
  the above coding works, but
 
  $output=exec(cp file1 file2);
  echo pre$output/pre;
 
  does not works. can any one help me out of this problem
 
 Riddle me this... exec() returns the last line of output from the result
 of
 the command. What is the last line of output when you run cp file1
 file2
 from the command line?
 
 ---John Holmes...
 
 

When I was executing the cp command it doesn't return anything. 
But it returned the name of the last file when i executed the ls command

-
Sify Mail - now with Anti-virus protection powered by Trend Micro, USA.
Know more at http://mail.sify.com

Sify Power mail- a Premium Service from Sify Mail!
know more at http://mail.sify.com

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



[PHP-DB] Problem in executing linux command from PHP

2003-08-27 Thread Gnanavel
I have problem in executing  linux command

$output=exec(ls -a);
echo pre$output/pre;

the above coding works, but 

$output=exec(cp file1 file2);
echo pre$output/pre;

does not works. can any one help me out of this problem
-
Sify Mail - now with Anti-virus protection powered by Trend Micro, USA.
Know more at http://mail.sify.com

Sify Power mail- a Premium Service from Sify Mail!
know more at http://mail.sify.com

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



Re: [PHP-DB] Problem in executing linux command from PHP

2003-08-27 Thread CPT John W. Holmes
From: Gnanavel [EMAIL PROTECTED]


 I have problem in executing  linux command

 $output=exec(ls -a);
 echo pre$output/pre;

 the above coding works, but

 $output=exec(cp file1 file2);
 echo pre$output/pre;

 does not works. can any one help me out of this problem

Riddle me this... exec() returns the last line of output from the result of
the command. What is the last line of output when you run cp file1 file2
from the command line?

---John Holmes...

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