Why am I losing my session on page changes? Why am I losing my session on page changes? codeigniter codeigniter

Why am I losing my session on page changes?


If you use CodeIgniter Session Library you must know that "The Session class does not utilize native PHP sessions. It generates its own session data"

CodeIgniter Session Class


my problem was somewhat simple, I kept loosing my session data any time I changed pages, and it tuns out the solution was quite simple. in the config file of CI you have to put you websites base URL, and I put and the session was being created for http://www.mysite.com/ so the php sdk/api created one session for the first url and another for the second.. thus i lost all of the data as soon as i changed pages. so it's a simple problem, but took a lot of trouble shooting.