Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6332291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:14:08+00:00 2026-05-24T18:14:08+00:00

I have an application built with codeigniter using the sessions class and storing session

  • 0

I have an application built with codeigniter using the sessions class and storing session data in a database. The problem is I’m getting extra session records in my database when my webpage loads a css file.

Up until recently I was running my application on a simple VPS host provided by rackspace. Database and Apache were both running on the same VPS. Recently however I’ve migrated my application to PHPFog to allow it to scale more easily. I didn’t have this issue with
my former hosting setup.

enter image description here

The row with the populated value for user_data is my original session. The other three blank sessions are the result of simply refreshing the page three times. I seem to have tracked it down to including a css file in my header, when I comment it out or delete it the issue goes away. It’s only this particular css file also, other css/js/image files don’t cause this issue.

Here is a link to the css file in question:
http://pastebin.com/XfEBNFiC

Anyone know what could be causing this? Thanks!

UPDATE:
I realized the html of the page in question might be helpful. Commenting out the stylesheet include on line 13 makes the issue go away.
http://pastebin.com/iBEb4he6

UPDATE2:

$config['sess_cookie_name']     = 'ci_session';
$config['sess_expiration']      = 7200;
$config['sess_expire_on_close'] = FALSE;
$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;

/*
|--------------------------------------------------------------------------
| 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
| 'cookie_secure' =  Cookies will only be set if a secure HTTPS connection exists.
|
*/

$config['cookie_domain']    = 'casey.phpfogapp.com'; //$base_url_parts['host'];
$config['cookie_path']      = '/';

$config['cookie_prefix']    = "";
$config['cookie_secure']    = FALSE;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:14:09+00:00Added an answer on May 24, 2026 at 6:14 pm

    In my applications I place the following code into .htaccess for preventing a cookie to be sent with css/js/images requests:

    #.htaccess
    
    # Use Mod_deflate to compress static files
    <ifmodule mod_deflate.c>
    <filesmatch ".(js|css|ico|txt|htm|html|php)$">
    SetOutputFilter DEFLATE
    </filesmatch>
    </ifmodule>
    
    # Speed up caching
    FileETag MTime Size
    
    # Expires
    ExpiresActive On
    ExpiresDefault "access plus 366 days"
    
    # Future Expires Headers
    <filesmatch ".(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
    Header set Expires "Sat, 27 Dec 2014 23:59:59 GMT"
    </filesmatch>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well, the problem is as follows: I have a WPF Application built using the
I'v built a application using codeigniter and I have a message system that displays
I have a small ajax application built with php. Using phpMyAdmin I have set
I have a Windows Form application built on a data model and a Windows
I have an application built with GWT/Appengine/Jdo...and i am using Google User Service for
I have inherited an application built using the Microsoft Office Information Bridge Framework 1.6.
we have an web-application built in flash (it's actually just getting built :D) where
Here's a use case: I have a desktop application (built using Eclipse RCP) which
I have a PHP web application built with CodeIgniter MVC framework. I wish to
I am using codeigniter php MVC framework to develop a web application. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.