Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Here is what I am trying to figure out. I have ubb.threads installed in a /forum/ subdirectory under my root. My main URL is http://forum.site.com/ (a sub-domain).

Now I have a few directories I have added IN the forum directory (ie forum/dir1) where I can call the threads main.inc and limit access to those pages based on who is in what group. Sorta neat.

Anyway - what I am TRYING to do is that same thing...in a directory ABOVE the /forum directory. Basically this:

mainftp/forum/ = my ubb.threads install
mainftp/private/ = pages I am trying to limit access.

Now when I call the main.inc, it looks like "require ("../forum/main.inc.php");"

That does not work, it states I must log in. When I hit the login button...I am already logged in and it takes me immediately to my start page.

I tried setting cookies to / so they are site readable (they were not previously so), and I logged out and in. No luck.

Any quirky thing I am missing here?

Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
If the cookie path is "/", then the cookies will be read regardless of the directory from which the script runs. The problem may be the subdomain, since UBB.threads (still) doesn't let you configure the cookie domain. If you access the script using the URL forum.site.com, then the cookies will get created with that domain, and they would not be readable by a script invoked with the URL site.com.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I think cookies from subdomains are different from each other. This is the main issue when people configure the domain in threads with and without the www.

For example www.ubbdev.com is a different cookie from just ubbdev.com

That's my understanding of it. You can only read the cookie from the same domain (sub domains are different).

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Doah -
The doorbell rang and Dave beat me to it.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
That is what I was afraid of.

Time to either load UBB.Threads in a new folder (not subdomain), or figure out how to call em!

Thanks guys.

Sponsored Links
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I have moded my 6.1 to have configurable subdomain for cookies as well, haven't ever had a problem.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Any chance that is a hack out here somewhere Gardener? I can muck through it...but if there is already a road map, no reason to get all mucky!

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
No, I've never released it as a hack... Guess I could write it up if you want, I don't think it's that much of a change.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
If there is one place I am seriously lacking...it is cookies and how they work.

Don't write it up on my behalf...if it is not already out there, I will figure it out eventually, heh.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
From the 6.4 changelog
[]Created a ubbt_setcookie function that all cookies are now set with. This gives a central location for any special cookie modifications.[/]

I bet this will be easier in 6.4.

Sponsored Links
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
Joined: Dec 2000
Posts: 1,471
Yeah, it will.
It's a bit annoying at the moment. It's an easy change, but you need to modify many files at the moment.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
[]Medar said:
If there is one place I am seriously lacking...it is cookies and how they work.[/]

Here's the starting point on learning about cookies: Client Side State - HTTP Cookies.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Very cool, thanks Josh, Astaran, and Dave

Time to go read.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)