Cakephp flash消息在apache服务器上消失


cakephp flash messages dissapearing on apache server

被困在这里几个小时了!

我使用cakephp 2.4.4,我有相当标准的重定向与flash消息。由于某些原因,flash消息没有出现在我的生产服务器上(运行apache)?!如果我注释掉重定向,则会出现flash消息。

我的应用程序似乎在我的开发服务器(运行nginx)上完美地工作。

有人有什么想法吗?

$this->Session->setFlash(__('The User -'.$e["User"]['name'].'('.$e["User"]['resource_payroll_number'].') - Has been Activated'), 'alert', array('class' => 'alert-success'));
$this->redirect(array('action' => 'index'));

这一定是因为您的调试级别。检查core.php文件。

/**
* CakePHP Debug Level:
*
* Production Mode:
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
*
* Development Mode:
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
* 2: As in 1, but also with full debug messages and SQL output.
*
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/
Configure::write('debug', 2);

这是从github cakephp复制的