【发布时间】:2013-05-30 22:29:30
【问题描述】:
我们正在开发一个基于 Codeigniter 2 的项目。 一切都很好,直到我们将 Apache httpd 从 2.2.21 更新到 2.2.24。 PHP版本还是一样的(5.3.25)。
对于构建视图,我们使用Template library from Phil Sturgeon。
控制器函数可能如下所示:
public function index(){
if($this->_is_logged && $this->_is_super){
redirect('/start', 'refresh');
}else{
$this->template
->set_partial('page_header', 'web/template/page_header',$this->data)
->set_partial('page_footer', 'web/template/page_footer')
->set_partial('page_notifications', 'web/template/notification_view',$this->data)
->set_layout('minimum')
->build('start/authenticate_view');
}
}
更新后这会导致 500 内部服务器错误 ...
但是,当在 ifstatement 之前添加 echo 时,如下所示:
public function index(){
echo $this->_is_logged.' '.$this->_is_super.' -- test --'.$this->data;
if($this->_is_logged && $this->_is_super){
redirect('/start', 'refresh');
}else{
$this->template
->set_partial('page_header', 'web/template/page_header',$this->data)
->set_partial('page_footer', 'web/template/page_footer')
->set_partial('page_notifications', 'web/template/notification_view',$this->data)
->set_layout('minimum')
->build('start/authenticate_view');
}
}
使用页面顶部echo 中的值构建页面。
我们已经将 Apache httpd 降级到 2.2.21,并且一切都再次正常工作,无需更改任何代码。所以我们确信它与 Apache 版本有关。也许它与模板库中使用的代码有关,或者其他一些奇怪的东西......?
我们正靠在这个墙上。
有没有人有同样的问题,知道问题可能是什么,......你将永远是我们的英雄:)
附加信息:
- 我们将 DataMapper ORM 用于 CI 模型
- cPanel 版本:11.36.1(内部版本 6)
- 操作系统 Linux
【问题讨论】:
-
您的 apache 错误日志中有任何内容吗?
-
最后一次参赛日期为5月
标签: php apache codeigniter-2 apache2.2