CodeIgniter Forums
[help]problem with ci sessions - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: [help]problem with ci sessions (/showthread.php?tid=3577)



[help]problem with ci sessions - El Forum - 10-11-2007

[eluser]cesarius[/eluser]
Hello!
Ive got a problem here:
I want to have acsess to the site wich is located at a computer in internal network/
the name of it is netcomp
on an internet site (www.xxx.ru) it all works fine but with this name i can not store session it says tha loggedin is rfalse however it must be true/// maybe you could help me how to configure config.php? here is mine:
Code:
<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|    http://www.your-site.com/
|
*/
$config['base_url']    = "http://netcomp/";
/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'session_cookie_name' = the name you want for the cookie
| 'encrypt_sess_cookie' = TRUE/FALSE (boolean).  Whether to encrypt the cookie
| 'session_expiration'  = the number of SECONDS you want the session to last.
|  by default sessions last 7200 seconds (two hours).  Set to zero for no expiration.
|
*/
$config['sess_cookie_name']        = 'ci_session';
$config['sess_expiration']        = 7200;
$config['sess_encrypt_cookie']    = FALSE;
$config['sess_use_database']    = FALSE;
$config['sess_table_name']        = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent']    = TRUE;

/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix' = Set a prefix if you need to avoid collisions
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
| 'cookie_path'   =  Typically will be a forward slash
|
*/
$config['cookie_prefix']    = "";
$config['cookie_domain']    = "kontsevoisb";
$config['cookie_path']        = "/";
thanks for your help


[help]problem with ci sessions - El Forum - 10-11-2007

[eluser]Michael Wales[/eluser]
Code:
$config['cookie_domain']    = "kontsevoisb";

This will only work if people visit the intraweb site via: http://kontsevoisb/ - is this how people access it?

Basically, you want that line to read exactly what people enter to get to your home page (minus the http:// and the trailing slash). If you want it to be a cookie across the entire domain, so your subdomains can access it as well, omit the subdomain and begin with a period (example, omit www and make it .domain.com).


[help]problem with ci sessions - El Forum - 10-11-2007

[eluser]cesarius[/eluser]
http://kontsevoisb - this is how people access it...


[help]problem with ci sessions - El Forum - 10-11-2007

[eluser]Michael Wales[/eluser]
Code:
$config['base_url']    = "http://netcomp/";
$config['cookie_domain']    = "kontsevoisb";

Somethings not right...


[help]problem with ci sessions - El Forum - 10-15-2007

[eluser]cesarius[/eluser]
[quote author="walesmd" date="1192163709"]
Code:
$config['base_url']    = "http://kontsevoisb/";
$config['cookie_domain']    = "kontsevoisb";

Somethings not right...[/quote]
wanted just to change computername here.... but the problem still exists((((