Lost session |
[eluser]Coyoterj[/eluser]
Hi CI's friends, I like CodeIgniter and participate in the brazilian forum. I have a problem and before turning to the forum, I reduce my code to facilitate In controller: Code: function update() { Then, a view is called with one only form and return for function update. The result Code: var_dump($this->session->userdata('produpId')); bool(false). I changed CI Session with PHP $_SESSION, and no problem... But I want to use CI Session.. ;-) [To be] a bug [or not to be] a bug ?? :lol: Thanks and good lucky for us!
[eluser]Derek Allard[/eluser]
Sessions are not readable until the next page load. If you moved to another controller, you should be able to see it.
[eluser]Coyoterj[/eluser]
[quote author="Coyoterj" date="1205368225"]Hi CI's friends, In controller: Code: function update() { Then, a view is called with one only form and return for function update. The result Code: var_dump($this->session->userdata('produpId')); bool(false). [/quote] Hi Derek ! Thanks for the helping. Just in case, the function update is in a controller named prod.php, this function calls a view container.php with a form inside it. In this form i have used a form_open('prod/update') and when it return to prod/update i lost the session. Is this correct ? Best regards,
[eluser]tomodian[/eluser]
Maybe this article helps you. http://ellislab.com/forums/viewthread/74354/
[eluser]kopeah[/eluser]
Does anyone have any answer to this session issue? I also have a hard time reading anything from session. I even try by enabling database for storing session variables but still failed. It did populate ci_session table like it should just have hard time retrieving any data from it. I tested with both firefox and IE .. both have the same problem, so its not browser related. I didn't have any problem with session in the past, could it be something with the new version?
[eluser]Derek Allard[/eluser]
Hi Kopeah, welcome to CodeIgniter. Are you setting your session on one page and trying to read on another, or are you trying to do it all in one page?
[eluser]kopeah[/eluser]
Hi Derek, I got the session set on one page and another page trying to read it.
[eluser]Derek Allard[/eluser]
ok, let's take a look at some code. Can you put some here for us to look at? How is the session library loaded?
[eluser]kopeah[/eluser]
Well this is what I have to test session. First page (login.php) Code: class Login extends Controller { Second page (test.php) Code: class Test extends Controller {
[eluser]Derek Allard[/eluser]
Hi Mike. Looking I don't see anything off hand. Where does $acl come from? Does it behave this way in all browsers? Have you tried another server by chance? |
Welcome Guest, Not a member yet? Register Sign In |