Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: generating unique string

by andreychek (Parson)
on Sep 19, 2001 at 20:06 UTC ( #113384=note: print w/replies, xml ) Need Help??

in reply to gernerating unique string

Well, if by any chance you are using Apache as your webserver, you could always use the Apache::Session module, which will happily generate unique numbers for you.

If you choose to make use of Apache::Session for this purpose, you would always have the option down the road to make use of the session support it provides -- allowing you to store data in the server across requests. Good luck!

Replies are listed 'Best First'.
Re: Re: generating unique string
by perrin (Chancellor) on Sep 19, 2001 at 22:04 UTC
    The unique ID generation in Apache::Session is actually not very good. It can have collisions, especially when used in a cluster of servers. You should replace that function with something better (I like mod_unique_id) if you use it in a cluster and are concerned about collisions.
Re: Re: generating unique string
by Anonymous Monk on Sep 19, 2001 at 20:14 UTC
    Thanks -- but unfortunately the server is NT 4 (yuk)

      Shouldn't be a problem. Apache runs just fine on NT4.


      "The first rule of Perl club is you don't talk about Perl club."

      Hmmm.. are you saying then that you are using IIS? Some folks still choose to use Apache on Windows NT.

      If you are using IIS, I know if provides unique ID's to all ASP scripts -- it's possible it does the same thing for Perl.. although I couldn't tell you how to determine that info. But perhaps that'll give you a start. It may even be provided to you in an environment variable or with the request string.
      NP: Apache::Session, much like 'Monster Island', is just a name, and can probably be used on whatever webserver you have at hand.


      Hands up those who got the Simpsons reference <g>

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://113384]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2022-08-19 08:15 GMT
Find Nodes?
    Voting Booth?

    No recent polls found