Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Sometimes while editing a controller or otherwise, I'll refresh the output from a web browser and receive a completely blank output. Even the "view Source" is blank. "Some Text!!!!!! <?php" at the beginning of the index.php file in "public" doesn't even print out.
In my httpd error_log, this line appears: $ [Fri Dec 14 13:58:53 2007] [notice] child pid 17924 exit signal Segmentation fault (11)
Now for some reason my coding is crashing something. I've been though all the changes I made since it was working, and can't find anything that would cause this. I've even commented out large sections of code in order to get SOMETHING to show up. The only way I can get anything to show up is by trying a controller that does not exist. At least that way I get the output of Some Text!!!!
Fatal error: Could not find the file /app/controllers/nofun_controller.php for the controller NofunController in /home/sambaserve/web/akelos/lib/AkRequest.php on line 759
Otherwise everything is blank. Is there any way to turn on logging of some sort? This is driving me crazy.
Thanks!
can't confirm, can't reproduce.
just copying helpers and renaming them to
*~ or *~.php
doesn't burn my apache.
Ok, now I can't reproduce it either, and only one of my controllers produces a blank output. I'll keep digging and report back with a slightly more detailed report. Thanks for checking, Kaste!
Ok, I'm able to repeat the no-output problem by doing the following: omitting a ";".
non-working code:function listing()
{
$this->condition_pages = $this->pagination_helper->getPaginator($this->Condition, array('items_per_page' => 10));
if(!empty($this->params['id'])) {
$_filter = array('conditions' => '_part.id = '.$this->params['id']);
} else {
$_filter = array();
} // no ; makes a blank-output , no error about a missing ;.
$_include = array('include' => array('part'));
$options = array_merge($_filter,$_include,$this->pagination_helper->getFindOptions($this->Condition));
$this->conditions = $this->Condition->find('all',$options);
}
working code: function listing()
{
$this->condition_pages = $this->pagination_helper->getPaginator($this->Condition, array('items_per_page' => 10));
if(!empty($this->params['id'])) {
$_filter = array('conditions' => '_part.id = '.$this->params['id']);
} else {
$_filter = array();
}; // the missing ;
$_include = array('include' => array('part'));
$options = array_merge($_filter,$_include,$this->pagination_helper->getFindOptions($this->Condition));
$this->conditions = $this->Condition->find('all',$options);
}
This certainly seems odd to me. I've never experienced the need for a semicolon after a closing brace in normal PHP. Does Akelos do some pre-processing with the application source code, so that Akelos might need it?
After 2 years building apps with this framework i never had this problem..
Try with this code:
function listing()
{
$this->condition_pages = $this->pagination_helper->getPaginator($this->Condition, array('items_per_page' => 10));
$_filter = (!empty($this->params['id'])) ? array('conditions' => array('_part.id = ?', $this->params['id'])) : array();
$_include = array('include' => array('part'));
$options = array_merge($_filter,$_include,$this->pagination_helper->getFindOptions($this->Condition));
$this->conditions = $this->Condition->find('all',$options);
}
1 to 7 of 7