• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
session from http to https

#11
[eluser]bretticus[/eluser]
[quote author="sampada" date="1237556408"]yeah it's different,
http://www.samedomain.tld and https://secure.samedomain.tld.[/quote]

I was going to crawl through CI source but decided I'm too lazy. Smile

Why don't you give the php native function a try:

session_set_cookie_params()

Perhaps...

Code:
$config['cookie_domain']    = ".samedomain.tld";

...only works with the built in CI cookie and session libraries.

#12
[eluser]joao.sobrinho[/eluser]
I'm having the same problem when the user is redirected from HTTPS to HTTP after login.

The session is lost in the production environment, because it is saved in the cookie. (saving it DB won't work... other problems came up in that approach)

Is there any configuration that can be made by default outsite of codeigniter that can make this behaviour to happen ?

In my case, it's the same domain, the HTTP and HTTPS pages.

#13
[eluser]bretticus[/eluser]
[quote author="joao.sobrinho" date="1268757416"]
The session is lost in the production environment, because it is saved in the cookie. (saving it DB won't work... other problems came up in that approach)

...

In my case, it's the same domain, the HTTP and HTTPS pages.[/quote]

Really? I have several websites that use DB sessions and they transition from http to https just fine.

#14
[eluser]joao.sobrinho[/eluser]
[quote author="bretticus" date="1268769496"][quote author="joao.sobrinho" date="1268757416"]
The session is lost in the production environment, because it is saved in the cookie. (saving it DB won't work... other problems came up in that approach)

...

In my case, it's the same domain, the HTTP and HTTPS pages.[/quote]

Really? I have several websites that use DB sessions and they transition from http to https just fine.[/quote]

As you can see in this post: http://ellislab.com/forums/viewthread/140924/#719007

saving sessions in DB, caused a big problem that was ramdom to happen... so, even more dificult do check where the error was.

I "solved" it by using less data in the session and using the CI Session Library, saving it in coockies and encrypting the data also.

This was yesterday... everything was fine on my local server (and still is).

Today in the morning, I sent the application to the server, and suddenly, when the user is redirected from HTTPS in the login to HTTP for the rest of the application, it doesn't find the session data I stored previously.

I've checked if there is any configuration in the server (php.ini) about coockies or something like that, and no luck.

I also tried replacing the session library by Native Session, but the first page wasn't even displayed... strange...

What can I do to solve this ?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.