Just purchased 3 copies of WSN Links. When logging in or out of WSN Links, which I installed on a subdomain, instead of taking me back to sub.domain.com/index.php, it is taking me to www.domain.com/index.php
I just checked an install I have on a subdomain (actually its WSN Forums, but I think it should act the same.) And the server name is listed as sub.domain.com
The only thing I could think of thats WSN related is the directory url. Although you have already looked in your admin panel, maybe you could look directly in the database with phpmyadmin. This field is "dirurl" and its in the settings table. If its not correct then you can change it in phpmyadmin or add the following to the bottom of your config.php
If the dirurl field is correct in your database then it may be a problem with the way your subdomain is set up. Are you using apache? If so do you have something like the below, note the server name.
I'm having a little trouble. Note: I'm running Apache 2 on an Ensim-based server. I found one of them, and the servername is www.domain.com, if I change it to sub.domain.com it will do that for everything.. hmmm
I only have an install on the subdomain. I think that I had accidentally set the realm for the cookie as www.domain.com at first, but changed it to sub.domain.com and cleared my cookies, restarted my browser and still the same deal.
Something else to note: I am using the phpBB integration feature. Could this be affecting it at all? (phpbb is running on diffsub.domain.com)
It looks like while navigating the "returnto" spot in the cookie changes from page to page. Sometimes it has it set to just "returnto" index.php, others it is to other pages. However when going to the main page it sets the "returnto" to goto www.domain.com/index.php , thus hitting logout sends you to www.domain.com/index.php
Sorry for the streaming "revelation" of posts, but I think I've narrowed down to where the issue is that I am running into. This line is where I'm getting hung up on:
should it? Also, do you know where it draws "$_SERVER['SERVER_NAME']"? I'm wondering if maybe I could just clear this all up by removing $_SERVER['SERVER_NAME'] and putting sub.domain.com in it's place. My only hesitation to do that is for upgrading and such. Would like to try using the best workaround available, rather than something my non-php/mysql-related-brainpower can come up with. ;-)
It now appears that everything is working fine now. My one question though, is whether or not this could hinder other operations? Could this make my downloads hotlinkable, etc, or will HTTP_HOST be fine in place of SERVER_NAME for these instances?
Since it seems to differ by host, for 3.3.12 the directory url value will override SERVER_NAME whenever set (there will be instances of SERVER_NAME still for the case in which it isn't set yet by that point in the script, but I don't believe that will be causing a problem).
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Problem: WSNLinks Installed on Subdomain
Usergroup: Customer
Joined: Mar 22, 2006
Total Topics: 8
Total Comments: 50
Just purchased 3 copies of WSN Links. When logging in or out of WSN Links, which I installed on a subdomain, instead of taking me back to sub.domain.com/index.php, it is taking me to www.domain.com/index.php
Any thoughts on how to fix?
Forum Regular
Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan
Total Topics: 57
Total Comments: 185
Hi Modem,
Im your admin panel, under system sonfiguration, is the correct value in the directory URL box?
It should be http://sub.domain.com with no slash on the end
Usergroup: Customer
Joined: Mar 22, 2006
Total Topics: 8
Total Comments: 50
Correct.
Directory URL: http://sub.domain.com
Cookie Details:
Domain: sub.domain.com
One thing to note is that on the main screen it shows:
Server Name: www.domain.com
Could that be affecting it?
Forum Regular
Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan
Total Topics: 57
Total Comments: 185
I just checked an install I have on a subdomain (actually its WSN Forums, but I think it should act the same.) And the server name is listed as sub.domain.com
The only thing I could think of thats WSN related is the directory url. Although you have already looked in your admin panel, maybe you could look directly in the database with phpmyadmin. This field is "dirurl" and its in the settings table. If its not correct then you can change it in phpmyadmin or add the following to the bottom of your config.php
$dirurl = ' http://sub.directory.com';
If the dirurl field is correct in your database then it may be a problem with the way your subdomain is set up. Are you using apache? If so do you have something like the below, note the server name.
Usergroup: Customer
Joined: Mar 22, 2006
Total Topics: 8
Total Comments: 50
In wsnlinks_settings dirurl is also set to:
http://sub.domain.com
In searching for...
I'm having a little trouble. Note: I'm running Apache 2 on an Ensim-based server. I found one of them, and the servername is www.domain.com, if I change it to sub.domain.com it will do that for everything.. hmmm
Forum Regular
Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan
Total Topics: 57
Total Comments: 185
Do you have a seperate httpd.conf file for each domain/subdomain under
/etc/httpd/conf/virtual/
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Do you also have an install at the www. which could be setting a cookie which is being read at the subdomain (cookie domain being .domain.com)?
No problems with http://links.webmastersite.net .
Usergroup: Customer
Joined: Mar 22, 2006
Total Topics: 8
Total Comments: 50
I only have an install on the subdomain. I think that I had accidentally set the realm for the cookie as www.domain.com at first, but changed it to sub.domain.com and cleared my cookies, restarted my browser and still the same deal.
Something else to note: I am using the phpBB integration feature. Could this be affecting it at all? (phpbb is running on diffsub.domain.com)
Usergroup: Customer
Joined: Mar 22, 2006
Total Topics: 8
Total Comments: 50
Further troubleshooting as yielded some odd results.
Cleared my cookies and logged into:
http://sub.domain.com/admin/
Clicked logout and it took me to:
http://sub.domain.com/index.php
Which is correct. Logged back into:
http://sub.domain.com/admin/
Then hit logout again, and it took me to:
http://www.domain.com/index.php
Which is incorrect. Cleared my cookies again and logged into:
http://sub.domain.com/admin/
and hit logout, and again it took me to the correct address of:
http://sub.domain.com/index.php
hmm..
Usergroup: Customer
Joined: Mar 22, 2006
Total Topics: 8
Total Comments: 50
More testing:
It looks like while navigating the "returnto" spot in the cookie changes from page to page. Sometimes it has it set to just "returnto" index.php, others it is to other pages. However when going to the main page it sets the "returnto" to goto www.domain.com/index.php , thus hitting logout sends you to www.domain.com/index.php
Usergroup: Customer
Joined: Mar 22, 2006
Total Topics: 8
Total Comments: 50
Sorry for the streaming "revelation" of posts, but I think I've narrowed down to where the issue is that I am running into. This line is where I'm getting hung up on:
$currenturl = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
-but-, that is inside of the following if statement:
if ($settings->dirurl == '')
so if dirurl isn't blank, it shouldn't run:
$currenturl = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];
should it? Also, do you know where it draws "$_SERVER['SERVER_NAME']"? I'm wondering if maybe I could just clear this all up by removing $_SERVER['SERVER_NAME'] and putting sub.domain.com in it's place. My only hesitation to do that is for upgrading and such. Would like to try using the best workaround available, rather than something my non-php/mysql-related-brainpower can come up with. ;-)
Usergroup: Customer
Joined: Mar 22, 2006
Total Topics: 8
Total Comments: 50
Fixed? Appears so. I did a find and replace.
I replaced all instances of:
SERVER_NAME
with:
HTTP_HOST
and these changes occurred in:
download.php
finlefunctions.php
index.php
It now appears that everything is working fine now. My one question though, is whether or not this could hinder other operations? Could this make my downloads hotlinkable, etc, or will HTTP_HOST be fine in place of SERVER_NAME for these instances?
Forum Regular
Usergroup: Customer
Joined: Feb 19, 2004
Location: Michigan
Total Topics: 57
Total Comments: 185
Good job Modem, you'll have to give show us the site when you get it all set up
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Since it seems to differ by host, for 3.3.12 the directory url value will override SERVER_NAME whenever set (there will be instances of SERVER_NAME still for the case in which it isn't set yet by that point in the script, but I don't believe that will be causing a problem).