Forum OpenACS Q&A: Simple: Setting My OWN Cookies....

Hi OpenACS folks... long time since posting AND
Our OACS 3.x systems are working fine...

I want to allow first time visitors without cookies
to come to a certain section of my site say


I want to give them my own private
chocolate chip cookie, totally separate from OACS cookies....

I want to retrieve this cookie at a later date
and I don't care if they have ever registered
or have or don't have an oacs cookie.
In other words... OACS own system is
independent and unrelated to my cookies.

SO my questions:

*1*) How/where do I tell the database that
ANYONE can go to /bobz/  no cookie needed?
Currently going to this directory redirects to Registration.

*2*) How do I set / retrieve cookies....
I was trying to test this but have been
hampered by the redirect to reg issue in *1*

I was hoping to use this pair:

ad_set_client_property  -secure f -browser f -deferred f -persistent t  "tgn" "bobz" "5"

set bobzcookie [ad_get_client_property -cache t -browser f -cache_only f  "tgn" "bobz"]

Or this pair:

ad_set_cookie -expires never "bobz" "5"

set bobzcookie [ad_get_cookie "bobz"]

Recommendations, corrections etc please and thanx!


PS: I asked a similar question almost a year and a
half ago and got some but not all of what I need now:

Posted by MaineBob OConnor on

This was driving me nuts and got me off on the wrong track....

I don't understand why but my test directory called /bobz/ requires a redirect to registration with a simple html / adp file with NO commands...

Yet, I can rename the directory to say /billz/ and all works as expected....

I must have used /bobz/ in the distant past and it must have some restriction somewhere... ....maybe some old acs code doing something...??? and I can't find it.... and I've stopped looking!

Anyway, the cookie thing works fine:

ad_set_cookie -expires never "bobz" "5"

set bobzcookie [ad_get_cookie "bobz"]


Posted by Andrew Piskorski on
In your /admin/site-map/, do you have permissions set correctly on that URL (aka site node)? What's that Site Map page tell you about permissions on your weirdly-behaving /bobz/ URL?