lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


* Roger Munk:

> On Fri, Jul 23, 2010 at 12:02 AM, Florian Weimer <fw@deneb.enyo.de> wrote:
>> * Roger Munk:
>>
>>> Can Lua access Apache environment variables? Can someone point me in
>>> the direction of an example?
>>
>> If I recall CGI correctly,
>>
>>  print(os.getenv("REMOTE_ADDRESS"))
>>  print(os.getenv("HTTP_USER_AGENT"))
>
> Thanks Florian, os.getenv seems to access OS environment variables but
> not Apache environment variables set by other Apache modules. The
> error message I got was:

Are those also called environment variables?  Oh well.

I think you need an APR/Apache binding for that, or mod_wombat.