Flash messages behave inconsistently


I’m using Yii 1.1.10. The flash messages work normally on the development server (Debian x64, Apache 2.2 prefork, mod_php 5.4.4).

But on the test server (RHEL i686, Apache 2.2 prefork, mod_php 5.3.3), with the same PHP code, the flash messages behave strangely. In FF13, they are sometimes displayed on two consecutive pages. In Opera12, they do not appear on the first page after a HTTP redirection, but on the next one (i.e. the flash messages are always one page late).

Has anyone already experienced something similar?

I tried to compare the php.ini, but nothing stroke me. Flash messages are kept in user sessions, so I checked their parameters, but they were the same on the 2 servers (notably save_handler=files). I’m running out of ideas of what to check, please help.


Had similar problems before.

Maybe this property can help you: http://www.yiiframework.com/doc/api/1.1/CWebUser#autoUpdateFlash-detail

Thanks for your reply.

When you had similar problems, did this fix them for you?

I knew this property existed. Maybe it could help Firefox display the flash message in only one page, but I can’t imagine how it would fix Opera’s behavior where flash messages are display one request too late. I’ll try it though.