Firefox PHP

Using Phorum logins

Posted by Steve H 
Using Phorum logins
December 27, 2007 04:58PM
I use the following method of requiring phorum logins on my site in several places:

$pwd = getcwd();
define('phorum_page', 'my_page');
echo "hi ",$PHORUM["user"]["username"];

It works as long as the person is already logged into the forum. I have problems though when they access a page in another directory without being logged in:

It tries to redirect them to login.php in the wrong directory. (thus giving a 404 error)

Any advice?
Re: Using Phorum logins
December 27, 2007 06:32PM
what is your HTTP Path set to in the General Settings?

Brian - Cowboy Ninja Coder - Personal Blog - Twitter
Re: Using Phorum logins
December 27, 2007 06:54PM
path in general settings:

files with includes are in another folder like:
Re: Using Phorum logins
December 27, 2007 07:02PM
Here is the (failing) redirect URL I get:,

If I simply change the first occurrence of "other" to "forum" in the URL, everything works nicely.
Re: Using Phorum logins
December 28, 2007 05:01AM
Are you using something like the automatic http_path module or the virtual hosting module? Those will dynamically try to find out the Phorum http path based on the currently requested URL. It seems like your setup is doing something like this.

Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Using Phorum logins
December 28, 2007 12:35PM
Ahh. Yes, indeed. I am using the Automatic HTTP Path module.

I tried turning it off and the behavior changed slightly, but still broken. Now I get redirected to the correct login page, but when I have logged in it tries to return me to the page I came from within the forum directory, rather than the originating directory. Thus:,

What I need is this:,
Sorry, only registered users may post in this forum.

Click here to login