[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: WebLua
- From: Björn De Meyer <bjorn.demeyer@...>
- Date: Mon, 15 Jul 2002 21:25:43 +0200
Nick Trout wrote:
>
> Its just a PHP script so I assume the Lua script has the same priviledges as
> the PHP script. So assumed if SF are prepared to let joe public set up
> projects and give them root access this script would be okay as well. How
> would I go about changing this?
Well, as explained in the mail of Christian, it's probably a false
alert.
You can use PHP's geteuid() to check whether the PGP
script runs as root or not.
> Incidently - a bit off topic - I can only seem to capture output from the
> exec or system commands in PHP if I call the command directly. I cant seem
> to create a bash script and capture out from this.
>
> eg. rl:
>
> #!/bin/bash
> ulimit -t 1
> lua -f makesafe.lua $1
>
> I can't "rl script.lua > file" in PHP and collect the output. Is there a
> trick here or have can you not collect the output of bash scripts in PHP?
>
> Nick
Normally, exec("rl script.lua 2>&1 > file"); should work fine.
I must admit that I have not tested it, though.
Maybe this link helps?
http://www.php.net/manual/en/function.exec.php
--
"No one knows true heroes, for they speak not of their greatness." --
Daniel Remar.
Björn De Meyer
bjorn.demeyer@pandora.be