Change location of /tmp directory

I started getting this error today on our site:

session_start() [<a href=‘function.session-start’>function.session-start</a>]: open(/tmp/sess_4edc6207c493f5d311375056b0440db7, O_RDWR) failed: Permission denied (13)

Because I’m on a shared hosting server I can’t edit the php.ini file to change the /tmp location.

Is there a way to do this in the yii config file?

Thanks,

Ben

I think you can call




Yii::app()->session-setSavePath('yourpath');



OR




// application components

'components'=>array(

  ...

  'session'=> array(

    'savePath' => 'yourpath'

  )

  ...

)



(not tested)

/Tommy

That fixed it. Thank you very much.