Hey everybody,

I'm sorry the first thing I do here is ask for you help, but I'm
really stuck on something that should be simple.

I'm using the cakephp 1.2 beta, and I'm trying to write something to a
session.

This is the relevant controller and function

class ProductsController extends AppController
        {
                var $helpers = array('Form', 'Html', 'Number', 'Time', 'Ajax',
'Session');
                var $uses = array('Product', 'Categoryproperty');

                function view($id = null) {
                $this -> Session -> write("test", "test");


                print_r($this->Session->read());
       }

When I run this page, it prints the session array containing 'test'
and 'test'. But as soon as I refresh the page, it's gone. In my
core.php it says 'Configure::write('Session.save', 'php');'

After about 4 hours of trying to just write a simple value to a
session, I figured something must've been wrong to the php save
method. I created the database table, and set
'Configure::write('Session.save', 'database');' (I also uncommented
the other lines).
When I run the page with this setting, it also prints the session
array, but I see no extra queries in debug mode, so I figure nothing
is being written to the database. I checked in phpmyadmin and the
table is indeed still empty.

Am I doing something wrong here, or is there anything else you need to
know/see (files?)?

Thanks in advance,
Regards!
Aeg

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to