Welcome Guest, Not a member yet? Register   Sign In
Help me with session CI on subdomain.
#1

[eluser]Nurbek[/eluser]
I have the site zpress.kg. It’s sessions works well. Because I made $config[‘cookie_domain’] = “.zpress.kg”; It’s OK.
But I have english version of this site.
eng.zpress.kg
I’ve done $config[‘cookie_domain’] = “.eng.zpress.kg”;
But sessions doesn’t work.
What should I do in this situation? I’m going insane for week.
#2

[eluser]TheFuzzy0ne[/eluser]
.zpress.kg should work for all subdomains.
#3

[eluser]Nurbek[/eluser]
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_encrypt_cookie'] = FALSE;
$config['sess_use_database'] = TRUE;
$config['sess_table_name'] = 'ci_sessions';
$config['sess_match_ip'] = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update'] = 300;


$config['cookie_prefix'] = "";
$config['cookie_domain'] = ".zpress.kg";
$config['cookie_path'] = "/";

My config file like this. What is wrong?
#4

[eluser]TheFuzzy0ne[/eluser]
Your session configuration looks fine to me.

Can you confirm that you aren't sending any output before the cookie is actually set. If any output is sent before the headers, then the cookie won't be set. It can simply be a single white space before an opening <?php tag, or after a closing ?> tag that may be causing the problem.
#5

[eluser]Nurbek[/eluser]
I am sending posts after the loading cookies(it's load by autoload)
Russion version is working fine(zpress.kg)
But english version(eng.zpress.kg) doesn't work sessions
The structures of both versions are similar for each other
#6

[eluser]Nurbek[/eluser]
I was searching the answer to this problem for a week.
But I havn't found.
OK. Only way I gotto change all my system, using simple $_SESSIONs. It makes me down.
I'll never use CI at the future.
Thanks.
#7

[eluser]TheFuzzy0ne[/eluser]
[quote author="Nurbek" date="1247064239"]I was searching the answer to this problem for a week.[/quote]

Well, this is the first I've heard of the problem. Did you post in the forum a week ago?

[quote author="Nurbek" date="1247064239"]OK. Only way I gotto change all my system, using simple $_SESSIONs.[/quote]

How will that make any difference? Have you tried clearing your browsers cookies since you changed the cookie settings? It's possible that the old cookie is being called upon.

[quote author="Nurbek" date="1247064239"]I'll never use CI at the future.[/quote]

That's just as well, since CodeIgniter and ignorant/impatient people do not mix. You posted only a few hours ago, and seem annoyed that you're problem has not been solved already. You really should have posted a week ago, and then your problem would have most likely been solved already...

Please decide. Do you want the community to continue to help you with this, or are you giving up on CodeIgniter? I ask this so no-one has to waste any of their time if it's not necessary.
#8

[eluser]Nurbek[/eluser]
Man, Yes I've posted question today.
But general I was reading posts about this problem for a long time.
At the last time I've asked.
Why does myself must need for a lie?
Only thing that I need is just resolve my problem
#9

[eluser]TheFuzzy0ne[/eluser]
Did you try clearing your cookies as I suggested?
#10

[eluser]Nurbek[/eluser]
Yes. I'm doing that. But there is no changes.




Theme © iAndrew 2016 - Forum software by © MyBB