Re: [PHP] system command runs application, but application doesn't work correctly

2008-01-16 Thread Daniel Brown
On Jan 16, 2008 7:56 PM, Apple <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to run mencoder command line utility to encode videos. > > When I use these two command in terminal (through SSH), everything works fine. > But when I run them from PHP script with system command, it doesn't work.

[PHP] system command runs application, but application doesn't work correctly

2008-01-16 Thread Apple7777
Hello, I'm trying to run mencoder command line utility to encode videos. When I use these two command in terminal (through SSH), everything works fine. But when I run them from PHP script with system command, it doesn't work. The commands are: First pass: system("/usr/local

RE: [PHP] system command

2007-10-27 Thread Instruct ICC
>> Maybe something to do with the last line (but I get several lines) >> Return Values >> >> Returns the last line of the command output on success, and FALSE on failure. >> >> > > I have within a web page: > $a=system('/usr/bin/lynx -dump http://api.hostip.info/country.php?ip='.$aa); > ?> > ...

Re: [PHP] system command

2007-10-26 Thread Ronald Wiplinger
Instruct ICC wrote: Use double quotes to get the value of $a or else you get the literal string "$a". $aa=system("lynx -dump http://api.hostip.info/country.php?ip=$a",$location); or $aa=system('lynx -dump http://api.hostip.info/country.php?ip='.$a,$location); Thanks! 1st solution did

RE: [PHP] system command

2007-10-26 Thread Instruct ICC
>> Use double quotes to get the value of $a or else you get the literal string >> "$a". >> >> $aa=system("lynx -dump http://api.hostip.info/country.php?ip=$a",$location); >> or >> $aa=system('lynx -dump http://api.hostip.info/country.php?ip='.$a,$location); >> >> > Thanks! 1st solution did not wo

Re: [PHP] system command

2007-10-25 Thread Ronald Wiplinger
Instruct ICC wrote: Date: Thu, 25 Oct 2007 09:43:14 +0800 From: [EMAIL PROTECTED] To: php-general@lists.php.net Subject: [PHP] system command I tried: $a=$_SERVER["REMOTE_ADDR"]; echo "REMOTE_ADDR=$a"; if($a="192.168.250.108") { $a="61.64.101.10

RE: [PHP] system command

2007-10-24 Thread Instruct ICC
> Date: Thu, 25 Oct 2007 09:43:14 +0800 > From: [EMAIL PROTECTED] > To: php-general@lists.php.net > Subject: [PHP] system command > > I tried: > > $a=$_SERVER["REMOTE_ADDR"]; > echo "REMOTE_ADDR=$a"; > if($a="192.168.250.108") {

[PHP] system command

2007-10-24 Thread Ronald Wiplinger
I tried: $a=$_SERVER["REMOTE_ADDR"]; echo "REMOTE_ADDR=$a"; if($a="192.168.250.108") { $a="61.64.101.101"; } $aa=system('lynx -dump http://api.hostip.info/country.php?ip=$a',$location); echo "a=$aaa=$aalocation=$location"; $aa=system('lynx -dump http://api.hostip.info/country.php?ip=61.64.

RE: [PHP] System Command and snmp commands

2004-10-26 Thread Mulley, Nikhil
4 12:41 PM To: [EMAIL PROTECTED] Subject: [PHP] System Command and snmp commands Hi All, I want to use system command to perform snmp queries on a remote machine and the problem is that I want to store the output /result in an Array , so that I can later use it for parsing purposes.I know I

[PHP] System Command and snmp commands

2004-10-26 Thread Mulley, Nikhil
Hi All, I want to use system command to perform snmp queries on a remote machine and the problem is that I want to store the output /result in an Array , so that I can later use it for parsing purposes.I know I could use exec and passthru statements actually,But I am unable to store the result

Re: [PHP] system command

2004-08-24 Thread Daniel Schierbeck
Ron Clark wrote: Daniel Schierbeck wrote: Ron Clark wrote: Capture the output in the $output variable then ob_clean to empty the output buffer before printing the the desired message. ob_get_clean() is preferable: $output = ob_get_clean(); // Gets the buffered output and cleans the buffer D

Re: [PHP] system command

2004-08-24 Thread ron clark
Daniel Schierbeck wrote: Ron Clark wrote: Capture the output in the $output variable then ob_clean to empty the output buffer before printing the the desired message. ob_get_clean() is preferable: $output = ob_get_clean(); // Gets the buffered output and cleans the buffer Didn't need the co

Re: [PHP] system command

2004-08-24 Thread Daniel Schierbeck
Ron Clark wrote: Capture the output in the $output variable then ob_clean to empty the output buffer before printing the the desired message. ob_get_clean() is preferable: $output = ob_get_clean(); // Gets the buffered output and cleans the buffer -- Daniel Schierbeck -- PHP General Maili

[PHP] Re:[PHP] system command

2004-08-23 Thread ron clark
John Holmes wrote: From: "ron clark" <[EMAIL PROTECTED]> I an trying to add virus scanning to the file upload section of our portal using uvscan. The virus scanning is working properly using a system call , but I am having problems with formatting the output. I need to check the return value and

Re: [PHP] system command

2004-08-23 Thread Jason Wong
On Tuesday 24 August 2004 03:49, ron clark wrote: > I an trying to add virus scanning to the file upload section of our > portal using uvscan. The virus scanning is working properly using a > system call , but I am having problems with formatting the output. I > need to check the return value and i

Re: [PHP] system command

2004-08-23 Thread John Holmes
From: "ron clark" <[EMAIL PROTECTED]> I an trying to add virus scanning to the file upload section of our portal using uvscan. The virus scanning is working properly using a system call , but I am having problems with formatting the output. I need to check the return value and if it is not a 0,

[PHP] system command

2004-08-23 Thread ron clark
I an trying to add virus scanning to the file upload section of our portal using uvscan. The virus scanning is working properly using a system call , but I am having problems with formatting the output. I need to check the return value and if it is not a 0, I want to create a custom message. Th

Re: [PHP] system command?

2004-05-11 Thread Jason Wong
On Monday 10 May 2004 23:00, Jas wrote: > I didn't sent off list, always to php.general in reply to whatever > message thread I am in. In any event, I have tried safe mode = On and > safe mode = Off with the 4 commands I listed in my last thread and my > actual code is using an echo = "$tailed";

RE: [PHP] system command?

2004-05-10 Thread Jay Blanchard
[snip] $tailed"; ?> [/snip] I forgot to take out the "=" $tailed"; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] system command?

2004-05-10 Thread Adam Voigt
lol On Mon, 2004-05-10 at 11:16, Jay Blanchard wrote: > [snip] > I didn't sent off list > [/snip] > > I am in an relatively crappy mood this day, you may want to NOT refute > something I have said and in essence call me a liar. You'll get little > help that way. > > P.S. Stop top posting too. --

RE: [PHP] system command?

2004-05-10 Thread Jay Blanchard
[snip] I didn't sent off list [/snip] I am in an relatively crappy mood this day, you may want to NOT refute something I have said and in essence call me a liar. You'll get little help that way. P.S. Stop top posting too. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: h

RE: [PHP] system command?

2004-05-10 Thread Jay Blanchard
[snip] I didn't sent off list, always to php.general in reply to whatever message thread I am in. In any event, I have tried safe mode = On and safe mode = Off with the 4 commands I listed in my last thread and my actual code is using an echo = "$tailed"; >>>$tailed = shell_exec('tail -f /path

Re: [PHP] system command?

2004-05-10 Thread Jas
I didn't sent off list, always to php.general in reply to whatever message thread I am in. In any event, I have tried safe mode = On and safe mode = Off with the 4 commands I listed in my last thread and my actual code is using an echo = "$tailed"; I even tried to remove the -f and replaced it

RE: [PHP] system command?

2004-05-10 Thread Jay Blanchard
[snip] It is now... but it still doesn't work. I have tried passthru(), exec(), shell_exec() & system() trying to tail -f a log file into a textarea box and I get nothing or the output is put in the headers and stops the rest of the page from loading. I am at a loss. Jay Blanchard wrote: > [

Re: [PHP] system command?

2004-05-10 Thread John Nichel
Jas wrote: Anyone know what this wouldn't work? I have tried using a couple of functions defined at http://us2.php.net/manual/en/ref.exec.php and none seem to have the desired effect. $tailed"; ?> Thanks in advance, Jas 'tail -f' won't exit. -- John C. Nichel KegWorks.com 716.856.9675 [EMAIL P

RE: [PHP] system command?

2004-05-10 Thread Daniel Purdy
[snip] > Anyone know what this wouldn't work? I have tried using a couple of > functions defined at http://us2.php.net/manual/en/ref.exec.php and none > seem to have the desired effect. > > $tailed = shell_exec('tail -f /path/to/log'); > //$tailed = exec('tail -f /path/to/log'); > //$tailed = s

Re: [PHP] system command?

2004-05-10 Thread Adam Voigt
I believe when you add the -f flag, the tail command doesn't exit, it just keeps printing as data is appended to the log, did you try dropping the -f flag? On Mon, 2004-05-10 at 10:15, Jas wrote: > Anyone know what this wouldn't work? I have tried using a couple of > functions defined at http:/

RE: [PHP] system command?

2004-05-10 Thread Jay Blanchard
[snip] Anyone know what this wouldn't work? I have tried using a couple of functions defined at http://us2.php.net/manual/en/ref.exec.php and none seem to have the desired effect. $tailed"; ?> [/snip] Is PHP running in safe mode? -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] system command?

2004-05-10 Thread Jas
Anyone know what this wouldn't work? I have tried using a couple of functions defined at http://us2.php.net/manual/en/ref.exec.php and none seem to have the desired effect. $tailed"; ?> Thanks in advance, Jas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph