Thank you Christophe and Jochen. You pointed me down the right path and I want to share the solution. It turns out that my hosting environment uses suhosin hardened PHP which is likely the cause of the problem. Adding suhosin into my solution search, I found this in oldforums.symfony-project.org:
>Re: User sessions do not persist on Ubuntu Server [message #100928 is a reply >to message #100918 ] Mon, 14 June 2010 19:33 dklanac > >Here is my final post. I figured out that the issue was only on my test >environment. sfSessionTestStorage was not setting the cookie that I needed. I >changed it over to sfSessionStorage and renamed my cookie with a "test" suffix >to prevent production cookie conflicts, and things behaved appropriately. This >would also explain why I was able to see the correct behavior on my dev >instance, since it also uses the regular sfSessionStorage class. We use separate subdomains for dev, test, stage, and production, so my solution was even simpler. I just changed sfSessionTestStorage to sfSessionStorage in apps/appname/config/factories.yml. I don't expect to need to alter the cookie name. Thanks again, Ryan On Feb 9, 2:15 pm, Jochen Daum <[email protected]> wrote: > Hi, > > On 10 February 2011 06:26, Christophe COEVOET <[email protected]> wrote: > > > > > > > Le 09/02/2011 17:57, Ryan Walker a écrit : > > >> I am searching for a solution to an authentication problem and I see that > >> Serg had the same problem (#2 below) way back in May of last year before I > >> was on this list. As far as I can tell, no solution was posted to list. > > >> In my development environment on Mac OS X, sfDoctrineGuardPlugin is > >> working properly. When I attempt to access a secure page, I get redirected > >> to login. When I enter valid credentials, I get redirected back to the > >> initially requested page. > > >> In my test environment at DreamHost, it is not working properly. When I > >> attempt to access a secure page, I get redirected to login. When I enter > >> valid credentials, I get redirected back to the initially requested page, > >> but symfony loses my authentication status and (re-)redirects me back to > >> login once again with the form emptied. (In contrast, if I enter invalid > >> credentials, then I receive an error message on the login page and the > >> username remains filled in.) > > >> In each environment, symfony does verify my credentials are valid and that > >> I have 'admin' privileges, but test forgets those credentials as soon as it > >> redirects me back to my requested page. > > >> Nothing interesting shows up in the apache error log. > > > This seems to be an issue with the session on your server. If the session > > variable are not stored, the authentication status cannot be saved. > > You should ask the Dreamhost support to know why session variables does not > > work. > > This is not a symfony related suggestion. > > I found often Session issues were caused by the suhosin module, which > comes with many Ubuntu based hosts. Try to turn session encryption off > and see if it helps. I found for example that sometimes the Document > Root is part of the encryption and it may not always work as expected. > > HTH > > Kind Regards, > > Jochen Daum > > "There is no shortcut to anywhere worth going" - Beverly Sills > > Automatem Ltd > Phone: 09 630 3425 > Mobile: 021 567 853 > Email: [email protected] > Skype: jochendaum > Website:www.automatem.co.nzhttp://twitter.com/automatemhttp://nz.linkedin.com/in/automatemhttp://www.xing.com/go/invite/3425509.181107http://www.aucklandbusinessnetworking.co.nz -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
