1
TDave
URL vs IP Login Woes
  • 2006/9/8 11:25

  • TDave

  • Just popping in

  • Posts: 6

  • Since: 2006/9/6 1


All

Just really a quick question on something that I'm struggling with.

Just recently installed XOOPS on my server and found the setup and installation a breeze. Much easier than anything I've setup before.

My only trouble is a slight hitch I'm encountering when logging in.

If I open my browser and go direct to the URL (http://toiletpolitics.co.uk) and log in then, fine it allows me to log in, but as soon as I go to view any of the members areas (or Administration Menu) then it tells me I do no have sufficient privileges and returns me to the homepage, logged out.

However, if I go to access the site directly via its IP address and login then I can do whatever I want. Conversely if I then go back to the URL toilepolitics.co.uk and log in as another user, or log out and back in as the same user, it works perfectly.

Now, I can sort of understand why it's behaving like this (all the buttons link to the area via IP address, due to the XOOPS_URL in mainfile.php points to the IP address. The only reason it does this is that if I set it to the URL for some reason the site doesn't load properly (no images, no graphical layout, just a mangled version, really).

Any ideas on how I can rectify this? Or any more information I need to provide?

XOOPS Version: 2.0.14
Server: Apache2 + PHP5 + MySQL5.0


Thanks

2
McNaz
Re: URL vs IP Login Woes
  • 2006/9/8 11:41

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Hi there.

Your mainfile.php has XOOPS_URL ashttp://217.19.134.138/_toilet/.

What happens here is when you login by going tohttp://toiletpolitics.co.uk your browser records your login cookie againsthttp://toiletpolitics.co.uk. As soon as you click on any of your menu linkshttp://217.19.134.138, the browser assumes you are on a different site and you loose the login cookie information. This is because cookie are stored against URLs (simple explanation).

The solution is to correctly set your XOOPS_URL tohttp://toiletpolitics.co.uk

HTH

3
TDave
Re: URL vs IP Login Woes
  • 2006/9/8 11:49

  • TDave

  • Just popping in

  • Posts: 6

  • Since: 2006/9/6 1


McNaz

Thanks, the problem is that when I tried to set the address to that before the site doesn't load correctly (ie. No graphics, no layout as per CSS etc).

Is there any reason for that to happen? Or is that due to forwarding difficulties from my host (1and1.co.uk)? Is it possible that that would cause the trouble?

Many thanks for the quick reply

4
McNaz
Re: URL vs IP Login Woes
  • 2006/9/8 12:01

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


In that case there could be an issue with your XOOPS_ROOT_PATH.

Ideally, XOOPS_ROOT_PATH = /home/yourdomain/html/(Your XOOPS mainfile.php is here).

Again, HTH.

Cheers.

5
TDave
Re: URL vs IP Login Woes
  • 2006/9/8 12:27

  • TDave

  • Just popping in

  • Posts: 6

  • Since: 2006/9/6 1


XOOPS_ROOT_PATH = /var/www/_toilet/htdocs
XOOPS_URL =http://www.toiletpolitics.co.uk

Clearly the root path is not the home directory as you wrote it, but this is just the server layout
Of course, if changing it would work then I can do that but this could get interesting...

Any reason why the above wouldn't work?
Domain routing routes toiletpolitics.co.uk to 217.19.134.138/_toilet/htdocs

Again, thanks for your help, sorry if I'm being dumb - PEBKAC!

6
McNaz
Re: URL vs IP Login Woes
  • 2006/9/8 12:34

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


<FRAME SRC="http://217.19.134.138/_toilet/htdocs/" SCROLLING="AUTO" NAME="bannerframe" NORESIZE>


FRAME!!! Yeach!!! .

I don't how you would do it on your server but the above should read:

<FRAME SRC="http://www.toiletpolitics.co.uk" SCROLLING="AUTO" NAME="bannerframe" NORESIZE>


I must say that this not an ideal way to run Xoops.

Maybe someone else who has the experience (and stomach) for Frames maybe able to help you some more here.

Good luck!

7
TDave
Re: URL vs IP Login Woes
  • 2006/9/8 12:44

  • TDave

  • Just popping in

  • Posts: 6

  • Since: 2006/9/6 1


Hmmm good point, I didn't think to check that.

Basically 1and1 are placing everything I forward to in a frame.

Now, to see if I can change it within 1and1...

At least, that seems to be my conclusion - I certainly didn't set frames up! Honest!

Hmmm, very interesting... maybe it's not 1and afterall... doh, I can be dumb. But how to rectify it...

8
McNaz
Re: URL vs IP Login Woes
  • 2006/9/8 13:03

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Well, this is ont my area of experise so I may be talking poopies here.

Basically, when you say

Quote:
Domain routing routes toiletpolitics.co.uk to 217.19.134.138/_toilet/htdocs


Means that you have a index.html page onhttp://toiletpolitics.co.uk that has an iframe that points to 217.19.134.138/_toilet/htdocs. IMHO, this is not an ideal way of doing it and you will experience problems with pretty much any php script you try and run.

Ideally,http://toiletp.... needs to point directly to /var/www/_toilet/htdocs. An Apache server should be able to do this by creating a virtual domain that has its document root pointing to /var/www/_toilet/htdocs.

That would be the ideal setup. I'm not too sure how 1and1 run their servers so you will need to contact them to give you a proper domain redirection service (and not a Mickey Mouse Frame solution).

Again, maybe someone else here can give you more info.

Cheers.

9
TDave
Re: URL vs IP Login Woes
  • 2006/9/8 13:37

  • TDave

  • Just popping in

  • Posts: 6

  • Since: 2006/9/6 1


Yep, that's basically how understood it as well.

Like I say, I haven't even taken webspace with 1and1, just Domain Registration (maybe that's why they give me Mickey Mouse forwarding...) and I agree, that's not how I'd want to domain forward (even in my vastly limited experience..!)

Already fired an email off to 1and1 so waiting a reply.

Failing that, who do you reccommend for hosting?

Thanks once more for all your help.

10
McNaz
Re: URL vs IP Login Woes
  • 2006/9/8 14:02

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Hi again.

Quote:
217.19.134.138


I take it that is your own static IP address to your own box?

Quote:
Failing that, who do you reccommend for hosting?


If you have your own box with and IP address then no. The theory is that all you need is for your hostname (toilethumour...) to point to the above IP address. You'll need at least a WWW A record which 1and1 should be able to setup for your.

Apache will then need to be configured to access requests coming on the toilethumour domain. This is outside the scope of this post/forum but Googling "apache virtual domain" should give you a starting place.

As for hosting.... I offer hosting but it is managed hosting (and expensive because it is managed). Otherwise you always have uk.net or surpasshosting.com, which I've used but they tend to be cheap and cheerful (ie servers can be oversubscribed).

Good luck.

Login

Who's Online

91 user(s) are online (48 user(s) are browsing Support Forums)


Members: 0


Guests: 91


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits