Re: Newbie asks about multi-lingual website strategies
| From: | Colin Guthrie | Date: | Wed, 28 Nov 2007 14:56:07 +0000 |
| Subject: | Re: Newbie asks about multi-lingual website strategies | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265133@lists.php.net to get a copy of this message | ||
Jeff Benetti wrote:
> Am I correct that if two people are logged on using two different languages
> that the session var will keep track of the different users (by IP I assume)
> and the server won’t mess up?
Sessions are per-user and are not global (you'd need to use something
like memcache or similar for global persistence). PHP is different from
e.g. ASP/JSP which implement a "Share everything" system, vs PHP's
"Share nothing" (these are real terms believe it or not!).
Sessions usually work via a cookie that PHP set's automatically the is
stored for the duration of their visit on your site (till they restart
their webbrowser). By default the cookie is called PHPSESSID. If a user
has cookies disabled PHP can rewrite your HTML URLs on the fly to
include the argument on the GET vars (sess_use_trans_id) but this is far
from reliable.
HTHs
Col