On Mon, 2003-11-10 at 00:34, Chris Shiflett wrote:
> --- Robert Cummings <[EMAIL PROTECTED]> wrote:
> > I did mention database as one of the solutions. The question wasn't
> > about security so I didn't elaborate.
>
> I have done this same thing in the past, because I tend to answer the
> question
--- Robert Cummings <[EMAIL PROTECTED]> wrote:
> I did mention database as one of the solutions. The question wasn't
> about security so I didn't elaborate.
I have done this same thing in the past, because I tend to answer the
question asked and nothing more.
However, recently I have begun trying
Teren; PHP-General
Subject: RE: [PHP] Executing shell commands
I did mention database as one of the solutions. The question wasn't about
security so I didn't elaborate.
Cheers,
Rob.
On Sun, 2003-11-09 at 16:45, Javier Muniz wrote:
> Ack! No no no no no! At least put something
is being read from /tmp then it should be treated the
> same way user-inputted data is, and never trusted.
>
> -Javier
>
> -Original Message-
> From: Robert Cummings [mailto:[EMAIL PROTECTED]
> Sent: Sunday, November 09, 2003 12:47 AM
> To: Teren
> Cc: PH
, November 09, 2003 12:47 AM
To: Teren
Cc: PHP-General
Subject: Re: [PHP] Executing shell commands
On Sun, 2003-11-09 at 03:41, Teren wrote:
>
> Hi, I'm trying to write a front end for something and I want to be
> able to execute shell commands. I tried all of the pre-written
> function
On Sun, 2003-11-09 at 03:41, Teren wrote:
>
> Hi, I'm trying to write a front end for something and I want to be able
> to execute shell commands. I tried all of the pre-written functions
> and non of them would work. I setup a user that can sudo and then i
> set apache to run as that user. So, wha
Hi, I'm trying to write a front end for something and I want to be able to execute
shell commands. I tried all of the pre-written functions and non of them would work. I
setup a user that can sudo and then i set apache to run as that user. So, what I tried
to do is shell_exec("sudo -s; reboot;")
sa-ws1/share/webadm1/public_html/system-reports/security/rhos
ts/eqty/$system` ;
Thanks.
Samir.
-Original Message-
From: Curt Zirzow [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2003 12:15 PM
To: '[EMAIL PROTECTED]'
Subject: Re: [PHP] executing shell commands.
* Thus
* Thus wrote Sethi, Samir (IDS DM&DS) ([EMAIL PROTECTED]):
>
> I am executing the following within PHP -
>
> $system = `/bin/ls
> /dcsa-ws1/share/webadm1/public_html/system-reports/security/rhosts/eqty | /bin/egrep
> -v "server|header|index|report|php|old|title" | /bin/head -$x | /bin/tail
>
Hi!
I'm not sure this could be your problem, but this is
what I see:
$numlin = '/bin/cat
/dcsa-ws1/share/webadm1/public_html/system-reports/security/rhosts/eqty/$system
| /bin/wc -l';
I think you should write it like this:
$numlin = "/bin/cat
/dcsa-ws1/share/webadm1/public_html/system-reports
I am executing the following within PHP -
$system = `/bin/ls
/dcsa-ws1/share/webadm1/public_html/system-reports/security/rhosts/eqty | /bin/egrep
-v "server|header|index|report|php|old|title" | /bin/head -$x | /bin/tail
-1 | /bin/awk '{ print $1 }'` ;
$numlin = `/bin/cat
/dcsa-ws1/share/we
scott wrote:
Thanks Chris,
Could you explain to me how to launch a program from PHP as
another user, such as root? The app that I am trying to launch, apache
does not have rights to. And, it would be to complex of a procedure to
change the ownership on all of the processes that go with it.
The
Use the execution operator backtricks (``)
';
echo `ls -la`;
?>
will throw you the shell's ls -la to the browser
--
Maxim Maletsky
[EMAIL PROTECTED]
scott <[EMAIL PROTECTED]> wrote... :
> Hello,
>
> Does anybody know how to execute a shell command from PHP on a Linux
> system?
>
> Thanks
> Does anybody know how to execute a shell command from PHP on a Linux
> system?
Yes.
---John Holmes...
PS:
http://homepages.tesco.net/~J.deBoynePollard/FGA/questions-with-yes-or-n
o-answers.html
PSS: http://www.php.net/manual/en/ref.exec.php
--
PHP General Mailing List (http://www.php.net/
scott wrote:
Hello,
Does anybody know how to execute a shell command from PHP on a Linux
system?
exec() and friends.
HTH
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I believe something like this would do it:
system('ls -l');
> -Original Message-
> From: scott [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 23, 2003 9:06 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Executing Shell Commands.
>
>
> Hello,
>
Hello,
Does anybody know how to execute a shell command from PHP on a Linux
system?
Thanks,
Scott
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
17 matches
Mail list logo