Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Sessions not working!
  • Hi,

    My sessions are not working at all on localhost! I have IE9, FireFox and Chrome I get no cookies in any of the browsers and the database sessions table is never updated.

    I know my database settings are correct because I created the table using oil.

    I followed the configuration instructions so I have no clue what is going on here.

    Is there a link someplace for showing how to fully set the sessions up?

  • HarroHarro
    Accepted Answer
    localhost is an illegal hostname, as per RFC. You should never use it, as more and more browsers are becoming more RFC compliant and will reject the cookie.

    Ideally you should work with virtualhosts with a valid hostname, ending on ".local" or ".dev".

    If you want to keep working with a single webhost, create a new hostfile entry like "localhost.dev" as an alias for 127.0.0.1.

    It could also be a timezone issue, but since you're on Windows, I assume you dev and test on the same machine?
  • Hi Harro,

    I solved it by editing my host file and adding 127.0.0.1  fuelphp.dev

    Sessions are now creating the cookie and populating the database.

    Thank you for your time on this.

  • Kool... eh... Cool! ;-)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion