Re: Sessions and cookies

From: Kelv (ah_at_well.ysee)
Date: 12/03/03


Date: Wed, 03 Dec 2003 09:38:35 -0600

Craig wrote:
> I have a site that uses session_start() on all pages, and that's how the
> session is carried.
>
> $_SESSION['userid'] = 100;
>
> However, alot of my users can't access the site, because their browser is
> stopping them from using cookies.
>
> I've decided the best way to fix this is to put the session in the URL.
>
> However, what changes do I need to make to get this to work to the links (
> <href="...), the forms <Input type=... and my php.ini ?

I hope you don't have too many links and forms to add it to! :)

PHP has the ability to do this itself, in that if it can't set a cookie
it will automatically append PHPSESSID to the URL. However it does need
to have been compiled with the --enable-trans-sid parameter.

If you run your own server it shouldn't be a big deal to enable it, but
getting your host to do it in a timely manner may take longer, and they
may say no. Ask nicely :)

Kelv

----
LoHost - Low cost high uptime Internet Services. UK & USA
PHP,MySQL,Domains,Spam/virus blocking,POP3/IMAP/SMTP auth
SSH&SCP/FTP/FP2k,logs,stats & more! http://www.lohost.com


Relevant Pages

  • Re: Sessions and cookies
    ... On 2003-12-03, Craig wrote: ... > However, alot of my users can't access the site, because their browser is ... > I've decided the best way to fix this is to put the session in the URL. ...
    (alt.php)
  • Sessions and cookies
    ... However, alot of my users can't access the site, because their browser is ... stopping them from using cookies. ... I've decided the best way to fix this is to put the session in the URL. ...
    (alt.php)
  • Re: Lets talk about HTTPS Everywhere
    ... even just a session ID - which can be just a random number with no ... I think the problem is that online services rely just on cookies ... but there are also cross-site scripting attacks that are not ... Encrypting the contents of the HD can ...
    (Debian-User)
  • Re: Hiding variables passed via URL
    ... well you can view cookies as well. ... What else constitutes a 'session variable' apart from POST or GET data ... But then you don't understand that session variables aren't POST or GET ... You could coordinate PHP with Javascript. ...
    (comp.lang.php)
  • Re: Hiding variables passed via URL
    ... well you can view cookies as well. ... What else constitutes a 'session variable' apart from POST or GET data ... But then you don't understand that session variables aren't POST or GET ... You could coordinate PHP with Javascript. ...
    (comp.lang.php)