Cakephp logout and redirect not working properly on web sever and when i am fetching data from databse then data is not showing when i am refreshing page then showing but its working well on localhost


public function logout() {


public function webdelete($id = null) {
$this->Project->id = $id;
if ($this->Project->delete($id)) {
$this->Session->setFlash(__(‘Project deleted’));

        $this->redirect(array('controller' => 'projects', 'action' => 'viewprojectweb'));

I sometimes need to delete the files in tmp/cache/models and persistent on web server. On local server my debug mode make this for me.