Apache 错误 - 子 pid 1789 退出信号总线错误 (10)
我收到这个奇怪的错误 child pid 1789 exit signal Bus error (10)
我以前在 Apache 错误日志中从未见过。我正在使用 FuelPHP 框架。网络应用程序运行良好。但今天突然我创建了新的控制器,它本身就是另一个控制器的副本。我复制的那个工作正常(http://localhost/myapp/admin/users),但是副本(http://localhost/myapp/admin/apartments)让我犯了这个错误?!我对此感到沮丧。
经过 3 个小时的调试,我终于找到了所有事情停止的那一行。它位于 FuelPHP 核心的 Router 类中的这一行 if (class_exists($class))
处。 if 之前的 $class
具有值 Controller_Admin_Apartments
,它是我添加的类,存在于我的控制器类文件夹中。
Fuel/core/classes/router.php:
protected static function parse_segments($segments, $namespace = '', $module = false)
{
$temp_segments = $segments;
foreach (array_reverse($segments, true) as $key => $segment)
{
$class = $namespace.'Controller_'.\Inflector::words_to_upper(implode('_', $temp_segments));
array_pop($temp_segments);
if (class_exists($class)) // ***** HERE ERROR HAPPENS ***** //
{
return array(
'controller' => $class,
'action' => isset($segments[$key + 1]) ? $segments[$key + 1] : null,
'method_params' => array_slice($segments, $key + 2),
);
}
}
// Fall back for default module controllers
if ($module)
{
$class = $namespace.'Controller_'.$module;
if (class_exists($class))
{
return array(
'controller' => $class,
'action' => isset($segments[0]) ? $segments[0] : null,
'method_params' => array_slice($segments, 1),
);
}
}
return false;
}
FeulPHP 论坛 中的用户指出这可能是硬件相关。但事实并非如此。我把整个东西移到另一台电脑上,但仍然有同样的东西。我就是不明白。这里发生了什么?
I get this strange error child pid 1789 exit signal Bus error (10)
I have never seen before in my Apache error log. I am using FuelPHP framework. The web app is working fine. But suddenly today I created new controller, which itself is a copy of another controller. The one I copied from works fine (http://localhost/myapp/admin/users), but the copy (http://localhost/myapp/admin/apartments) makes me that error?! I am frustrated over this.
After 3 hours of debugging I finally found the line where the whole things stops. It is in the FuelPHP core in Router class at this line if (class_exists($class))
. The $class
before the if has value Controller_Admin_Apartments
, which is the class I have added and exists in my controller classes folder.
fuel/core/classes/router.php:
protected static function parse_segments($segments, $namespace = '', $module = false)
{
$temp_segments = $segments;
foreach (array_reverse($segments, true) as $key => $segment)
{
$class = $namespace.'Controller_'.\Inflector::words_to_upper(implode('_', $temp_segments));
array_pop($temp_segments);
if (class_exists($class)) // ***** HERE ERROR HAPPENS ***** //
{
return array(
'controller' => $class,
'action' => isset($segments[$key + 1]) ? $segments[$key + 1] : null,
'method_params' => array_slice($segments, $key + 2),
);
}
}
// Fall back for default module controllers
if ($module)
{
$class = $namespace.'Controller_'.$module;
if (class_exists($class))
{
return array(
'controller' => $class,
'action' => isset($segments[0]) ? $segments[0] : null,
'method_params' => array_slice($segments, 1),
);
}
}
return false;
}
A user in FeulPHP forum noted this could be Hardware related. But it is not. I moved the whole thing to another computer and still have the same thing. I just don't get it. What is happening here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,开枪射击我。刚刚发现我自己的错误。我不知道为什么会发生这种情况,但我的控制器
Controller_Admin_Apartments
中出现合成错误。我有这个函数:注意这一行:
if (apartment = Model_Apartment::find($id))
,我忘记在变量名称前面添加$
。我真的很惊讶 FulePHP 框架没有提醒我这一点,而且我遇到的唯一错误是在 Apache 错误日志中:S。奇怪,只是奇怪……Ok shoot me. Just found the error my self. I don't know why it happens but I had a synthax error in my controller
Controller_Admin_Apartments
. I had this function:Note the line:
if (apartment = Model_Apartment::find($id))
, where I forgot to add$
in-front of variable name. I am really surprised FulePHP framework did not alert me at this and that the only error I had was in the Apache error log :S. Strange, just strange...这是一个完全不同的解决方案,但与“信号总线错误”相关:当我不小心在 php.ini 的内存限制中输入
512MB
而不仅仅是512M
时,我得到了这个错误环境。This is a completely different solution, but related to the 'signal Bus error': I got this when I had accidentally entered
512MB
rather than just512M
in my php.ini's memory_limit setting.