I had a site in the local windows system made in cakephp. When I uploaded it to server (linux environment) the site works fine but some controllers are showing blank pages. The site works fine in local system though.
For example, when I type http://example.com/dashboard it correctly redirects back to login page but when I type http://example.com/settings it shows only blank page.
I have tried clearing tmp folder caches, renaming the controller to something else like Books, changing debug level, but neither any error shows up nor the page loads correctly. But error shows up on other pages if I make a mistake. So error reporting is working fine.
If I allow the controller action in the beforeFilter()
using $this->Auth->allow()
the page loads up but the codes like AuthComponenet::user('name')
return empty values.
So the problem seems to be in the AuthComponenet which is successfully redirecting some pages to login and not redirecting some. And for those pages (or controllers) that it doesn't redirect it shows only a blank page irrespective of whether I am logged in or not. So what can be the possible error? The CakePHP version is 2.5.5.
Following is the AuthComponent initializing code in the AppController:
public $components = array(
'Auth' => array(
'loginAction' => array(
'controller' => 'members',
'action' => 'login'
),
'authError' => 'Did you really think you are allowed to see that?',
'authenticate' => array(
'Form' => array(
'userModel' => 'Member',
'fields' => array('username' => 'name','password'=>'password'),
'passwordHasher' => array(
'className' => 'Simple',
'hashType' => 'md5'
)
)
)
),
'Session',
//'DebugKit.Toolbar'
);