You are here: Re: sessions and domain names « PHP Programming Language « IT news, forums, messages
Re: sessions and domain names

Posted by Jerry Stuckle on 10/30/06 18:44

readmy@otherlips.com wrote:
> In article <W_GdnTmEc5nxPN_YnZ2dnUVZ_sudnZ2d@comcast.com>,
> jstucklex@attglobal.net says...
>
>>example.com and www.example.com are, by definition, two different hosts.
>> The fact they resolve to the same physical server is immaterial. PHP
>>is 100% correct in its operation.
>>
>
> No
>
> example.com and www.example.com are the same host by both fact and hence
> definition. It is the domain being addressed not necessarily a physical
> machine I agree. However...
>



Actually, not. It is a common misconception. I can easily set up one
host as example.com - and it be an email server, for instance.
www.example.com could be on another machine. And ftp.example.com could,
obviously, be a third machine.

Back in the 70's and early 80's before the internet became a commodity
(and was generally known as arpanet), it was quite common to have the
email server set up as example.com. And depending on the size of the
company, you could also have ftp.example.com, gopher.example.com and others.

> The fact is that using www. as a prefix to a domain in order to
> address a web server on that host may not be formal syntax but it is
> formal by dint of common usage. Common usage for some time has been to
> address the same host in either manner. Anyone reserving a domain today
> will have both assigned and resolved as the same address making them
> interchangable.
>

Common usage is not the same as the RFC's. RFC's determine what is a
host and what isn't. It is quite common to have www.example.com and
example.com point to the same host. But that does not change the fact
that they identify two different hosts - which just happens to be the
same machine.

Even Apache and IIS have to be set up to handle both www.example.com and
example.com. Setting up one does NOT set up the other.

> It is PHP that calls this a host and then provides 2 different answers as
> to what that host is called during the same connection. The fact that it
> comes up with 2 different answers to the same question during the same
> connection should be telling you something?
>

It is the RFC's which call this a host. PHP is following the RFC's in
its operation.

Of course, you can always put in a request to change the RFC's.

> That is a bug. And as big as a bug can get.
>
> This makes PHP very much incorrect.
>
> This is how the internet works. PHP needs to address this.PHP cannot
> generate reliable sessions for all users until such time as this is
> fixed.
>
>
> In the mean time how about telling him how to avoid the bug?

Yes, this is how the internet works. And PHP is working correctly.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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