Cakephp Session Handling Errors

Aaaaaargh.  If you see this when you put your cakephp app on a shared hosting environment:

Please verify that the current setting of session.save_path is correct

Here’s the fix that worked for me:

Look in  /app/Config/core.php and you will probably see this:

Configure::write(‘Session’, array(
‘defaults’ => ‘php’
));

Change this to:

Configure::write(‘Session’, array(
‘defaults’ => ‘cake’
));

see – http://book.cakephp.org/2.0/en/development/sessions.html

I found the answer here – http://stackoverflow.com/questions/10043770/cakephp-2-1-this-session-write-is-not-working

To quote Christian Strang:  “By default CakePHP uses the folder which is set in php.ini. This folder couldn’t be accessed in my hosting-environment (and I was not allowed to change the php.ini).  ….. This way, cake uses his own tmp-folder to store the session files. Also make sure that the tmp folder and his subfolders are writeable.”

 

 

 

Advertisements
Posted in Cakephp

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: