Welcome Guest, Not a member yet? Register   Sign In
$session set-bug?
#1

(This post was last modified: 11-15-2016, 07:44 PM by startbbs.)

PHP Code:
$session->set($newdata); 
when I use this function, the session data only is available for the next request, then the data was automatically cleared , it is same as $session->setFlashdata('item', 'value'); 
it that a bug? 

How can I save the session data into cookie? then encrypt cookie data.
Q&A for Codeigniter
StartBBS--open-source, light weight forum software.
Best VPS:Digital Ocean
Reply
#2

It's working for me. Are you forgot to add this line?

PHP Code:
$session->start(); 
Tafsir NU adalah sebuah aplikasi yang berisi kumpulan kajian kitab kuning yang disampaikan oleh Kiai Nahdhotul Ulama seperti Gus Baha, gus mus, dan kiai lainnya dalam format audio.
Reply
#3

(This post was last modified: 11-15-2016, 09:01 PM by startbbs.)

(11-15-2016, 08:40 PM)ridho Wrote: It's working for me. Are you forgot to add this line?

PHP Code:
$session->start(); 
Thanks, I forget!!! it works well now. 
I am using the file to save session data, Can I save it to cookie via encrypt?

Now, the session was saved as file in my hosting. how long will the session be cleaned? 
frankly I don't like to save the data in webhosing. because the reading speed is slow than from cookie.
Q&A for Codeigniter
StartBBS--open-source, light weight forum software.
Best VPS:Digital Ocean
Reply
#4

Yes you can, but for what? I think, this is a bad idea for storing session data to cookie although it's encrypted.

Soon, if you use $session->destroy();

If you don't like files for storing sessions, You can use database for storing sessions.
Tafsir NU adalah sebuah aplikasi yang berisi kumpulan kajian kitab kuning yang disampaikan oleh Kiai Nahdhotul Ulama seperti Gus Baha, gus mus, dan kiai lainnya dalam format audio.
Reply
#5

(This post was last modified: 11-15-2016, 09:40 PM by startbbs.)

(11-15-2016, 09:06 PM)ridho Wrote: Yes you can, but for what? I think, this is a bad idea for storing session data to cookie although it's encrypted.

Soon, if you use $session->destroy();

If you don't like files for storing sessions, You can use database for storing sessions.
Thanks, it works well now.
Q&A for Codeigniter
StartBBS--open-source, light weight forum software.
Best VPS:Digital Ocean
Reply




Theme © iAndrew 2016 - Forum software by © MyBB