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);
}
Yahoo! I can now come back to this strange error.
With a brand new install of Apache and PHP5 (and the cool Xdebug), I'm getting a blank screen while viewing a particular model.
I've narrowed it down to this line:
$journal_field->task_field->load();
If I comment out this line, I get Xdebug's errors (because the task_field is not loaded).
When I turn on $this->dbug(), the last few lines of the html file are thus:
<hr>
(mysqlt): SHOW COLUMNS FROM task_fields <code></code>
<hr>
which look fine. But the html file ends there. No closing Xdebug tables...nothing!
So my question is: Where should I go to start tracking down this odd behavior? is there a more detailed dbug that I can do to find out where it's failing? Database connections are working fine in other parts of the program. (and in the same view, but with a different journal_field).
Thanks for any tips!
Aha, and now I've solved it. PHP was exceeding it's memory limit (due to the huge akelos models and their 4x deep nesting attributes)
So to solve it I've upped PHP's memory. To solve it in the future I will need to rewrite a small portion of the program with custom SQL selection so it's a bit faster (instead of using Akelos models).
:-)
1 to 9 of 9