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.
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
>> 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);
> ?>
> ...
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
>> 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
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
> 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") {
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.
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
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
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
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
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
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
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
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,
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
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";
[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
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.
--
[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
[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
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
[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:
> [
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
[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
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:/
[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
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
29 matches
Mail list logo