FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to set secure flag on the session cookie in F5 (load balancer)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
How to set secure flag on the session cookie in F5 (load balancer) [message #175557] Fri, 07 October 2011 21:14 Go to next message
nick[1] is currently offline  nick[1]
Messages: 5
Registered: October 2011
Karma: 0
Junior Member
Hi All,

Does anyone know how to set the secure flag on the PHP session cookie
in the load balancer (F5)?
Basically I am using the PHP session cookie, with no secure flag, in
the backend code but I need to send this cookie to the end-user
(browser) with the secure flag set. I would like to be able to set /
unset the secure flag on the cookie in the load balancer.

Thanks in advance for any help.

Nick Roman
Re: How to set secure flag on the session cookie in F5 (load balancer) [message #175558 is a reply to message #175557] Fri, 07 October 2011 23:22 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 10/7/2011 5:14 PM, nick wrote:
> Hi All,
>
> Does anyone know how to set the secure flag on the PHP session cookie
> in the load balancer (F5)?
> Basically I am using the PHP session cookie, with no secure flag, in
> the backend code but I need to send this cookie to the end-user
> (browser) with the secure flag set. I would like to be able to set /
> unset the secure flag on the cookie in the load balancer.
>
> Thanks in advance for any help.
>
> Nick Roman

http://php.net/manual/en/function.session-set-cookie-params.php

Assuming, of course, your PHP code is running in the load balancer. If
not, this isn't a PHP problem.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: How to set secure flag on the session cookie in F5 (load balancer) [message #175559 is a reply to message #175558] Sat, 08 October 2011 20:41 Go to previous messageGo to next message
nick[1] is currently offline  nick[1]
Messages: 5
Registered: October 2011
Karma: 0
Junior Member
On Oct 7, 7:22 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 10/7/2011 5:14 PM, nick wrote:
>
>> Hi All,
>
>> Does anyone know how to set the secure flag on the PHP session cookie
>> in the load balancer (F5)?
>> Basically I am using the PHP session cookie, with no secure flag, in
>> the backend code but I need to send this cookie to the end-user
>> (browser) with the secure flag set. I would like to be able to set /
>> unset the secure flag on the cookie in the load balancer.
>
>> Thanks in advance for any help.
>
>> Nick Roman
>
> http://php.net/manual/en/function.session-set-cookie-params.php
>
> Assuming, of course, your PHP code is running in the load balancer.  If
> not, this isn't a PHP problem.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================

Jerry,

Thanks for your reply. So, I need to run the session-set-cookie-params
IN the load balancer and NOT in the backend server code?

Nick R.
Re: How to set secure flag on the session cookie in F5 (load balancer) [message #175560 is a reply to message #175559] Sat, 08 October 2011 22:35 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 10/8/2011 4:41 PM, nick wrote:
> On Oct 7, 7:22 pm, Jerry Stuckle<jstuck...@attglobal.net> wrote:
>> On 10/7/2011 5:14 PM, nick wrote:
>>
>>> Hi All,
>>
>>> Does anyone know how to set the secure flag on the PHP session cookie
>>> in the load balancer (F5)?
>>> Basically I am using the PHP session cookie, with no secure flag, in
>>> the backend code but I need to send this cookie to the end-user
>>> (browser) with the secure flag set. I would like to be able to set /
>>> unset the secure flag on the cookie in the load balancer.
>>
>>> Thanks in advance for any help.
>>
>>> Nick Roman
>>
>> http://php.net/manual/en/function.session-set-cookie-params.php
>>
>> Assuming, of course, your PHP code is running in the load balancer. If
>> not, this isn't a PHP problem.
>>
>
> Jerry,
>
> Thanks for your reply. So, I need to run the session-set-cookie-params
> IN the load balancer and NOT in the backend server code?
>
> Nick R.

The code I pointed you at is how you set the secure flag in your PHP
code. If you're not doing it in your PHP code, it's not a PHP question.

But I think you need to learn how a load balancer works. It does not
generally change flags in cookies, amongst other things. But that's
well off topic in a PHP newsgroup.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: retreive cookies
Next Topic: Business Intelligence 2011 (November 12th,Delhi)
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 23:05:49 GMT 2024

Total time taken to generate the page: 0.04208 seconds