Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorsuthern

    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.


    • CommentAuthorsuthern
    update: Well, I've found one thing of interest, even though it did not solve my problem.
    The editor I know and love, jedit, uses a ~ on the end of a filename to signify a temporary file.

    So in the models directory there would be both part.php and part.php~. I found that this was unacceptable by running ./script/console, and reading the output. Amazingly enough, the *.*~ files do not cause a problem elsewhere (that I can tell), only in the models directory. Perhaps someone with better Akelos knowledge could find out why *.*~ files are a problem in that directory. I don't know where to start looking. LOL.

    But even after removing the *.*~ files, the child pid still does a segmentation fault, and I still get a blank page of output. The sega continues! ;-)

    2nd Update: it's solved!! Apparently there can't be any *.*~ files in the _helper directories either. Once those were deleted, then I was able to find the error and fix it.

    What a pain.. and all because something in Akelos pays attention to *.*~ files. Perhaps that's something we should fix before v1.0
    • CommentAuthorKaste

    can't confirm, can't reproduce.

    just copying helpers and renaming them to

    *~ or *~.php

    doesn't burn my apache.

    • CommentAuthorsuthern

    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!

    • CommentAuthorsuthern

    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); }

    • CommentAuthoralake

    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?

    • CommentAuthorsalavert

    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);
    • CommentAuthorsuthern

    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:

    (mysqlt): SHOW COLUMNS FROM task_fields &nbsp; <code></code>

    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!

    • CommentAuthorsuthern

    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).