Note that there are some explanatory texts on larger screens.

plurals
  1. PODestroying a session with Codeigniter and Tank_Auth library
    primarykey
    data
    text
    <p>I am using Codeigniter for an application and added Tank_Auth as Authentication system.</p> <p>Locally (XAMPP) things work perfectly (login, logout). On a server though I noticed a bug, when I login , I go through, when I logout, I am redirected to the login page, when I do the same thing right away I login , I am in , I logout .. I am still in, the logout is not working anymore.</p> <p>I am wondering if this is a cookie/session issue.</p> <p>my logout function is like this :</p> <pre><code>function logout() { $this-&gt;db-&gt;cache_delete_all(); $this-&gt;tank_auth-&gt;logout(); $this-&gt;session-&gt;sess_create(); //$this-&gt;_show_message($this-&gt;lang-&gt;line('auth_message_logged_out')); redirect('/auth/login/','refresh'); //$this-&gt;_show_message($this-&gt;lang-&gt;line('auth_message_logged_out')); } </code></pre> <p>the only difference between the server verison and the local version is the .htaccess, I am wondering if this has anything to do with that</p> <p>My htaccess is </p> <pre><code>&lt;IfModule mod_expires.c&gt; ExpiresActive On ExpiresByType image/jpg "access 1 week" ExpiresByType image/jpeg "access 1 week" ExpiresByType image/gif "access 1 week" ExpiresByType image/png "access 1 week" ExpiresByType text/css "access 1 week" ExpiresByType application/pdf "access 1 week" ExpiresByType text/x-javascript "access 1 week" ExpiresByType application/x-shockwave-flash "access 1 week" ExpiresByType image/x-icon "access 1 week" ExpiresDefault "access plus 1 year" &lt;/IfModule&gt; &lt;ifModule mod_gzip.c&gt; mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* &lt;/ifModule&gt; DirectoryIndex index.php RewriteEngine on RewriteBase /app/ RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ ./index.php?/$1 [L,QSA] AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript text/css application/javascript </code></pre> <p>Any idea ?</p> <p>Thanks</p> <p><strong>EDIT : Problem Solved</strong> </p> <p>This was causing the session logout problem <code>ExpiresDefault "access plus 1 year"</code> After removing this line the authentication worked like a charm</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload