The connection was reset The connection to the server was reset while the page was loading. The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
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 IS THE CRASH *** //
{
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;
}
It crashes in line if (class_exists($class)). The $class variable before this if has value "Controller_Admin_Apartments", which is the name of my controller class of-course. WTF happens here? Class exists, controller file exists in the right path.... ?!? Harro Verton wrote on Wednesday 11th of January 2012:"child pid 1789 exit signal Bus error (10)" is an error related to memory, where a piece of memory is adressed that can't be accessed by Apache. This can have two major causes:
- hardware defect. to check, run an extensive memtest on your server
- bug in the apache code (core or one of the modules loaded) if your server has been running for quite some time without apache upgrades, I would suspect the hardware. If you have done recent apache updates, you might see if a revert fixes it.
<?php
class Controller_Admin_Apartments extends Controller_Admin
{
public function action_index()
{
$data['apartments'] = Model_Apartment::find('all');
$this->template->title = "Apartments";
$this->template->content = View::forge('admin/apartments/index', $data);
}
}
public function action_delete($id = null)
{
if (apartment = Model_Apartment::find($id))
{
$user->delete();
Session::set_flash('success', 'Deleted apartment #'.$id);
}
else
{
Session::set_flash('error', 'Could not delete apartment #'.$id);
}
Response::redirect('admin/apartments');
}
ErrorException [ Parsing Error ]: syntax error, unexpected '='as expected...
Harro Verton wrote on Thursday 12th of January 2012:If I do that here I getErrorException [ Parsing Error ]: syntax error, unexpected '='as expected...
Harro Verton wrote on Thursday 12th of January 2012:I haven't got a clue. I don't know XAMPP. Perhaps see if there's an update?
!
James It looks like you're new here. If you want to get involved, click one of these buttons!