开发者

zend_auth causing application to error

开发者 https://www.devze.com 2023-01-22 15:35 出处:网络
i have been following some online screencasts and tutorials about zend_auth. i have a basic zend application created by the zf tool.

i have been following some online screencasts and tutorials about zend_auth.

i have a basic zend application created by the zf tool.

within the index controller index action i place a little code to test if a user is authenticated.

if(!Zend_Auth::getInstance()->hasIdentity())
    {
        $thi开发者_Python百科s->_redirect('login');
    }

now as far as i'm aware this should check to see if the current session has been authorised with an identity if it hasnt (ie returns false)

it will redirect the screen to the login controller index action.

all i get is the default error action page stating

An error occurred Application error

does anyone have an idea wtf is going on. i have a suspicion it has something to do with needing to set up an autoloader but i have already set an include path to the library folder . (plus i have no issues with accessing controller actions and the likes.

i had another issue with a form stopping my application from rendering anything but i will create another question about that.


thanks keyne setting the error reporting on was a good idea for some reason i thought i had my app sent to development but it was production.

after looking at the error report i found i had forgotten to create a data folder on my test server to hold the session information.

so zend_auth creating a session failed to location the directory.

0

精彩评论

暂无评论...
验证码 换一张
取 消