Welcome Guest, Not a member yet? Register   Sign In
cookies dont work correct

Im having a problem with the cookies from my site.
Each time people need to login again...
I have tried many settings but nothing will help
can some1 please tell me the correct settings for the config?
My site is on linux server in var/html/folder
in the "html" are more sites hosted in different folders, all with CI.
here is my config:
| 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.
| "time_to_update"        = how many seconds between CI refreshing Session Information
$config["sess_cookie_name"]        = "xu2";
$config["sess_expiration"]        = 72000;
$config["sess_encrypt_cookie"]    = TRUE;
$config["sess_use_database"]    = TRUE;
$config["sess_table_name"]        = "sessions";
$config["sess_match_ip"]        = FALSE;
$config["sess_match_useragent"]    = TRUE;
$config["sess_time_to_update"]     = 300;

| 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"]    = "adultpics";
$config["cookie_domain"]    = ".adultpichost.eu";
$config["cookie_path"]        = "/";


must i change cookie path?
is all correct?
i tried setting sess_expiration to 0 but it dont work. still loggedout after browser close.
btw in my database i can only find dlsessions table, but no sessions table.
my url: www.adultpichost.eu

You must create the session table manually.

Also, I recommend you to always check the User Guide first, you'll find answers to most of your questions.


ive read it.
so without database there are no cookies?

[quote author="axisdude" date="1267932345"]ive read it.
so without database there are no cookies?[/quote]

Sort of. If you set 'sess_use_database' to TRUE and don't create the required database table, there won't be session storage.

ok so the only thing i need todo is creating a database table and then im done?
ir do i need to edit some files also?

Yes. Just check that the name of the table matches with the one in the config.


I loaded the table into the database and eddit the config.php
But still nothing..... after i close the browser and the open it again, im logged out each time.
Can some 1 give me step by step tutorial on what i need todo and change?
Its very anoying to need to login all the time....

Read the users guide!



Ive read it.
Im not an expert with CI...
I having troubles to understand what it is exactly what i need todo.
Perhaps its easyer that some1 tell me wich files are all needed for the cookies to work, then i can post them here.
then you can have a look on whats wrong.

Im using premade script fom xtrafile, since their support is not available im looking here for support.
so.. sorry for my noob questions.
thx in advantage.

Theme © iAndrew 2016 - Forum software by © MyBB