Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorswhitlow
     
    I am receiving the following errors (or 'Warnings') while I am trying to follow the online tutorial. I am simply trying to run the following command:

    ./script/generate controller PipersAK

    When I run the above script, it gives me the following error message:

    Warning: include(/Applications/MAMP/htdocs/akelos/script/../config/config.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/akelos/script/generate on line 21

    Warning: include(): Failed opening '/Applications/MAMP/htdocs/akelos/script/../config/config.php' for inclusion (include_path='.:') in /Applications/MAMP/htdocs/akelos/script/generate on line 21


    Can anyone help me out with this?

    Thanks!

    - Scott
    • CommentAuthormsalhab
     
    I guess that you did not configure your application and your database connections, you can do that by navigating the URL http://localhost/[youralias] ,where [youralias] is configured to point to "your/application/public/folder" .

    so if you r sure that you have made that, you must use the scripts located under your application root and not under akelos home.
    • CommentAuthorswhitlow
     
    I was running the script out of the akelos home instead of the newly created application root.

    Then I ran into this problem:
    http://forum.akelos.org/discussion/148/

    But I was able to fix it with the solution provided here.

    Thanks!
    • CommentAuthorVBharathi
     
    Hi,
    How to get error log in akelos
    • CommentAuthorKaste
     

    generally

    define('AK_LOG_EVENTS', true);
    

    in config/config.php.

    • CommentAuthorVBharathi
     
    hi,
    I add this statement in config/congfig.php.Eventhough i dont get error log in akelos
    • CommentAuthorThijs
     

    It's in log/development.log

    and you can show it in your terminal using

    tail -f log/development.log
    
    • CommentAuthorThijs
     

    But maybe you want to see the SQL statements and errors in your page? You can switch on the debugging for a model by putting

    $this->MODELNAME->dbug();
    

    in your action in your controller

    • CommentAuthorVBharathi
     
    hi,
    i am using xampp on WinXP.There is no file in the log/development.log. Pls tell me detail path to get error logs.
    • CommentAuthorVBharathi
     
    Hi,
    I got this error:"
    Fatal error: Call to a member function find() on a non-object in C:\Projects\akelos1\app\controllers\category_controller.php on line 64".
    What its mean?how could i rectify it?
    • CommentAuthorVBharathi
     
    Hi,
    I want a ebook on akelos
    •  
      CommentAuthorbermi
     

    VBharathi, you can have a look at Editam's code and into the Akelos Unit tests, and then Akelos API. On the forums we might also guide you on getting started with Akelos . It would be also nice if you could help other beginners documenting your discoveries in the wiki

    Regarding the development logs, it's pretty strange you don't get them. Are you sure you are not on production environment?

    • CommentAuthorVBharathi
     
    hi
    i am following akelos screencasts blog example.
    After adding this function in postController.php
    function comment()
    {
    $post=$this->post->find($this->params['id']);
    $post->comment->create($this->params['comment']);
    $post->save();

    $this->flash['notice']=$this->t("your comments are successfully added");
    $this->redirectTo(array('action'=> 'show','id'=>$post->id));

    }
    I got this error.
    Notice: Undefined property: Post::$comment in C:\Projects\akelos1\app\controllers\post_controller.php on line 59

    Fatal error: Call to a member function create() on a non-object in C:\Projects\akelos1\app\controllers\post_controller.php on line 59
    The error shows in this line
    " $post->comment->create($this->params['comment']);" this is line 59
    how could i rectify this?
    • CommentAuthorThijs
     

    Did you load the comment model in the post controller?

    like:

    class PostController extends ApplicationController
    {
    
        var $models = array('post','comment');
    
    • CommentAuthorVBharathi
     
    Thank Q,
    This loop is not working in Post example at show.tpl

    {loop post.comments}

    <hr />

    <p>{comment.body}</p>

    {end}

    I am following screencast example.
    How could i rectify this error?
    • CommentAuthorThijs
     

    I watched the screencast again (good refresher, I was forgotten you could pass collections to partials)

    And you're right: it isn't mentioned in the screencast. But the code is there.

    See in the show function around minute 16 in the screencast:

     $post = $this->post->find($this->params['id'] , array( 'include' => 'comment') );
    

    so the associated comments are loaded.

    Another way to do it would be:

    $post = $this->post->find($this->params['id']);
    $post->comment->load();
    
    • CommentAuthorVBharathi
     
    Thank Q Thijs,post example is working now
    • CommentAuthorVBharathi
     
    Hi,
    Now i am following testing on post example according screencast.
    But i got these errors

    C:\Projects\akelos1>php script/test unit
    Connection to the database failed. mysqlt://root:******@localhost/akelos_tests
    How could i connect database without fail.
    • CommentAuthorVBharathi
     
    Hi ,
    C:\Projects\akelos1>php script/test unit

    After executing this i got this error

    Fatal error: Call to a member function getLowerItem() on a non-object in C:\Proj
    ects\akelos1\test\unit\lib\AkActiveRecord\AkActsAsList.php on line 341
    How could i rectify this error? I am following screencast example.
    • CommentAuthorVBharathi
     
    I unable to create a directory

    I got these errors

    C:\proj\ake>c:\progra~1/xampp/php/php.exe script/setup -d bharathi
    Creating directory: C:\proj\ake\bharathi\bharathi

    There where some errors during the installation process:

    * Can't create directory: C:\proj\ake\bharathi
    how could i rectify this?
    •  
      CommentAuthorriffed
     

    try using the full path, script\setup -d c:\proj\ake\bharathi --force

    • CommentAuthorVBharathi
     
    After trying this path ,ake folder copied into bharathi folder.I didnt get directory as like booklink(tutorial)