PHPSESSID on QueryString

This is a discussion on PHPSESSID on QueryString within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi All, I am using session vars for admin security on some of my pages, to check if admin is ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-28-2006
Simon Harris
 
Posts: n/a
Default PHPSESSID on QueryString

Hi All,

I am using session vars for admin security on some of my pages, to check if
admin is logged on or not. This works AOK, But, when a non-authenticated
user clicks a link on a page that has session_start() in it, the link is as
I expect it to be, but has the following appended to it:

?PHPSESSID=793be....etc!

Whoops....Brain storm at this point. Seems PHP is automatically appending
this to enable sessions to work, as I had cookies disabled...clever! :)

Please do let me know if I'm not quite right here!

Cheers!
Simon.

--
-
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 9886 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!


Reply With Quote
  #2 (permalink)  
Old 09-28-2006
Mumia W. (reading news)
 
Posts: n/a
Default Re: PHPSESSID on QueryString

On 09/28/2006 07:48 AM, Simon Harris wrote:
> Hi All,
>
> I am using session vars for admin security on some of my pages, to check if
> admin is logged on or not. This works AOK, But, when a non-authenticated
> user clicks a link on a page that has session_start() in it, the link is as
> I expect it to be, but has the following appended to it:
>
> ?PHPSESSID=793be....etc!
>
> Whoops....Brain storm at this point. Seems PHP is automatically appending
> this to enable sessions to work, as I had cookies disabled...clever! :)
>
> Please do let me know if I'm not quite right here!
>
> Cheers!
> Simon.
>


You are correct. Set the preference "session.use_only_cookies" to "1" to
disable that feature.

--
paduille.4058.mumia.w@earthlink.net
Reply With Quote
  #3 (permalink)  
Old 09-28-2006
ZeldorBlat
 
Posts: n/a
Default Re: PHPSESSID on QueryString


Simon Harris wrote:
> Hi All,
>
> I am using session vars for admin security on some of my pages, to check if
> admin is logged on or not. This works AOK, But, when a non-authenticated
> user clicks a link on a page that has session_start() in it, the link is as
> I expect it to be, but has the following appended to it:
>
> ?PHPSESSID=793be....etc!
>
> Whoops....Brain storm at this point. Seems PHP is automatically appending
> this to enable sessions to work, as I had cookies disabled...clever! :)
>
> Please do let me know if I'm not quite right here!
>
> Cheers!
> Simon.
>


Read this:
<http://www.php.net/manual/en/ref.session.php#session.idpassing>

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:25 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0