Hi everybody!

As already mentioned in one of my previous posts, I base my PHP web applications on the FuelPHP framework (www.fuelphp.com). I was working on an application of mine, and making some tests, the application started to automatically log out me after inserting my credentials in the login page.

In the log generated by Fuel, there was the following message:

The session data stored by the application in the cookie exceeds 4Kb. Select a different session storage driver.

I knew that Fuel allows you to select different kind of storage for your session data.

What I didn’t know is that the default storage type is “cookie”, which as the name suggests, store your data in a browser cookie.

Exceeded the 4kb size, Fuel threw an exception…

To solve the problem you simply have to change the session storage type from “cookie” to “file”.

Here how to do…

Since it is not recommended to modify Fuel’s configuration files directly, as first step I suggest you to take the file “fuel/core/config/session.php” and copy it to “fuel/app/config/session.php”.

Now you can override fuel default session config making changes to the file copied under your “app” folder.

So open the file “fuel/app/config/session.php” and change the key

'driver'          => 'cookie'


'driver'          => 'file'

That’s it for now! Bye!