Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorsuthern
    • CommentTimeDec 14th 2007 edited
     

    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!

    • CommentAuthorsuthern
    • CommentTimeDec 14th 2007 edited
     
    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
    • CommentTimeDec 15th 2007
     

    can't confirm, can't reproduce.

    just copying helpers and renaming them to

    *~ or *~.php
    

    doesn't burn my apache.

    • CommentAuthorsuthern
    • CommentTimeDec 17th 2007
     

    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
    • CommentTimeDec 17th 2007 edited
     

    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
    • CommentTimeFeb 10th 2008
     

    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
    • CommentTimeFeb 11th 2008 edited
     

    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);
    }
    
Add your comments
    Username Password
  • Format comments as