You are here: Re: Sessions « PHP Language « IT news, forums, messages
Re: Sessions

Posted by wombat on 01/25/07 12:16

In article <64-896002.04201023012007@news.west.earthlink.net>,
wombat <64@k.com> wrote:

> In article <8e234$45b3ab95$8259c69c$21164@news1.tudelft.nl>,
> "Rik" <luiheidsgoeroe@hotmail.com> wrote:
>
> > wombat wrote:
> > > In article <54555$45b2c877$8259c69c$9783@news1.tudelft.nl>,
> > > "Rik" <luiheidsgoeroe@hotmail.com> wrote:
> > >> wombat wrote:
> > >>> The site is in a subdomain. However, to eliminate some of the
> > >>> problems
> > >>> I've had I link everything through http://www.***.com/home/index.php
> > >>> instead of using http://home.***.com/index.php.
> > >>>
> > >>> Are sessions url dependent? If so, is there a work-around?
> > >>
> > >> Cookies are host dependant (with an optional path).
> > >> home.*.com is not the same host as www.*.com
> > >>
> > >> I'd say I'm interested what the 'certain problems' were that you had
> > >> to use this contruction, it may be easier to fix those :-)
> > >
> > > The main problems I had occurred when I tried to create a "base" html
> > > link to my site using:
> > >
> > > $base="http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
> > >
> > > This way anytime I wanted to redirect back to the same page, all I
> > > would need to do is:
> > >
> > > href="$base"
> > >
> > > That created problems with the home subdomain. So I simply used the
> > > following instead:
> > > $base="http://www.*.com/home/index.php";
> >
> > Please explain the exact nature of the problem, because I don't get it. As
> > long as you're on a subdomain, $_SERVER['HTTP_HOST'] is correct, and I see
> > no reason to jump domain... Maybe are more detailed flow of you intentions
> > are in other: on what page/domain are your visitors doing what exactly?
>
> Sorry, been busy with work. 4AM and just getting home after 12 hours...
> as soon as I can (as soon as I wake up that is) I'll go through what's
> happening.

Alright, as I said I'm using the following to create a base to refer to
whenever I want to use a link to redirect back to the page itself:

$base="http:/"."/".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];

I was going to say the problem is coming from using HTTP_HOST but even
if I remove that and type the url in by hand, the issue seems to keep
surfacing around using a subdomain and how someone would enter the page.
On one hand when I'm using the editor provided by Yahoo, when I test the
page out I get one url (1). Then there's another url (2) if I hand type
it in using the subdomain, and then a whole other url (3) if I don't.

(1) ***.com/home/index.php

(2) home.***.com

(3) www.***.com/home/index.php

If the only problem was when I was using the editor, that's an easy work
around simply by testing it one way and changing it to work when it's
finally up, but not everybody will enter the page using the domain and
that's where I'm finding the biggest hang up.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация