Why is session name different than what I set

#1
[eluser]bmx322[/eluser]
I'm having a problem with Firefox creating a new BLANK cookie. I look at the cookie and it says the name is PHPSESSIONID....which I think is the default session name for regular PHP cookie handling.

I have the cookie name set in the system/libraries/Session.php file to ci_session, but when I read it in Firefox the name is as I stated above.

The problem occurs when I try to update my user profile (a test profile). CI keeps regenerating a new, what seems like an obviously blank, cookie because I get a PHP error that "userID" is undefined. And the login section appears as if I was not logged in and the menu is what I would expect if I wasn't logged in.

The weird thing is when I click the "Home" button the login section appears as though I am logged in and the correct menu with "logout" appears.

I've tested this in IE 7 and 8 and have no issue with it.

I have the default cookie settings. I tried changing them but it didn't fix anything.
I played with different sess_cookie TRUE/FALSE values but that didn't change anything.

FF is set to accept cookies, no restrictions.

I've read the Session.php file and it seems to follow the logical order.

Where is the call in CI that asks to reset the cookie? I have the sess_expiration = 0 and left the sess_time_to_update = 300.

I've been trying to figure this out for over 10 hours now...and nothing seems out of place. I've read through any post that had any reference to FF or cookies...and I didn't not find this problem...I found the reverse where IE acts up, but not FF.

I'm am trying to fix this site, I didn't create it but I am very capable of reading and following class based code.

The functions that run when a user updates their info has no call to any set/reset cookie function.


Any help is greatly appreciated!

Darren

#2
[eluser]skalrynd[/eluser]
You are correct in that PHPSESSID is typically the default cookie name.

Generally PHPSESSID's value is the session ID issued by php. It is odd that the cookie is being set but with an empty value. But then that could be why you are not seeing it in IE.

Some servers are set to automatically issue a session id in the page header. I believe it's a configuration in the ini (session.auto_start)

Check your server's session directives and compare here:

http://us2.php.net/manual/en/session.configuration.php

If the behavior in FF is correct as you mentioned above and it's based on functionality like CI_Session:Confusedess_read() in order to determine whether or not a user is logged in, then obviously the cookie 'ci_session' is being written. Some value is being returned to be used in the logic.

Most importantly If you DO have a ci_session cookie getting defined, PHPSESSID is a red herring for you unless you're wanting to alter the ini for session handling on your server. Not knowing many other details, I find this possibility most suspect.

Hope this helps.

#3
[eluser]bmx322[/eluser]
I just want to thank you for the response until I can test and get back with some more information.

I don't want your efforts to help going ignored.

Kind regards,

Darren

#4
[eluser]bmx322[/eluser]
RESOLVED!

Thanks for the assistance.

Since I didn't write this code and this was the first time I was exposed to CodeIgniter...I was looking more at process then actual URL values. This issue was....(drum roll please)

THE URL had TWO different prefixes. One with WWW the other without. That is why the cookies were resetting! What a bear!

I like this CodeIgniter thing..now that I've thoroughly read all the documentation to figure out this problem I just may start using it! I guess, good things come from bad!

Thanks for all that tried, or at least looked to see if they could help!

Darren


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.