The built-in Auth component does all this. I would seriously consider having a look there.
http://book.cakephp.org/view/172/Authentication Also how do you have IIS configured? Are you using fastcgi or isapi? - James On May 4, 10:42 pm, henry <liu_xugu...@hotmail.com> wrote: > Hi everybody, > > Please give me help !!! I made a CMS with cakephp, it 's work fine in > IE6,IE7, Firefox and Opera, but doesn't work in Safari and Chrome. > > Steps: > > 1. display the login page, enter username and password. click log in. > 2. display index page if username and password is right. In index > page, save username and usertype into session. > 3. check whether session(username) is empty when redirect any other > page. > > Problem: i found the safari or chrome always create new session when > redirect to other pages. So lost usename and usertype info in new > session. Result is can't log in and always display the login page. > > Current Cakephp config: > > cake version:1.2.2.8120 > Web Server : IIS > Database : mysql > > Core.php config: > Configure::write('App.baseUrl', env('SCRIPT_NAME'). '?url='); > Configure::write('Cache.check', true); > Configure::write('Session.save', 'cake'); > Configure::write('Session.cookie', 'PHPSESSID'); > Configure::write('Session.timeout', '10'); > Configure::write('Session.start', true); > Configure::write('Session.checkAgent', false); > Configure::write('Security.level', 'low'); > Cache::config('default', array('engine' => 'File')); > > Please give me any idea to fix it. Thanks a lot in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---