You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Thomas Lochmatter <li...@lothosoft.ch> on 2005/02/16 10:38:50 UTC

Request UNIQUE_ID

In the apache1/mod_perl1 environment, there was an
environment variable
    UNIQUE_ID
available. This ID was unique for each request.

In the apache2/modperl2 environment, this variable has
disappeared. I have not found any method in the mod_perl2
API. What's the "official" way to get/create such an ID?

-- Thomas

Re: Request UNIQUE_ID

Posted by Stas Bekman <st...@stason.org>.
Geoffrey Young wrote:
> 
> Thomas Lochmatter wrote:
> 
>>In the apache1/mod_perl1 environment, there was an
>>environment variable
>>    UNIQUE_ID
>>available. This ID was unique for each request.
>>
>>In the apache2/modperl2 environment, this variable has
>>disappeared. I have not found any method in the mod_perl2
>>API. What's the "official" way to get/create such an ID?
> 
> 
> you must have had mod_unique_id compiled in before:
> 
>   http://httpd.apache.org/docs-2.0/mod/mod_unique_id.html

Or you can use APR::UUID:
http://perl.apache.org/docs/2.0/api/APR/UUID.html
w/o needing mod_unique_id

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Re: Request UNIQUE_ID

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Thomas Lochmatter wrote:
> In the apache1/mod_perl1 environment, there was an
> environment variable
>     UNIQUE_ID
> available. This ID was unique for each request.
> 
> In the apache2/modperl2 environment, this variable has
> disappeared. I have not found any method in the mod_perl2
> API. What's the "official" way to get/create such an ID?

you must have had mod_unique_id compiled in before:

  http://httpd.apache.org/docs-2.0/mod/mod_unique_id.html

--Geoff

Re: Request UNIQUE_ID

Posted by Torsten Foertsch <to...@gmx.net>.
On Wednesday 16 February 2005 10:38, Thomas Lochmatter wrote:
> In the apache1/mod_perl1 environment, there was an
> environment variable
>     UNIQUE_ID
> available. This ID was unique for each request.
>
> In the apache2/modperl2 environment, this variable has
> disappeared. I have not found any method in the mod_perl2
> API. What's the "official" way to get/create such an ID?

mod_unique_id is your friend. If you don't want another C-module have a look 
at Apache::ClickPath. It creates IDs using the same information as 
mod_unique_id. Only the order has been changed.

Torsten