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

    I've created my first Akelos project, following the tutorial, but using one table which I added with script/migrate. I also created a Scaffold for this table. There were no error messages.
    I added these 2 lines to config.php:

    define('AK_DEBUG', true);
    define('AK_LOG_EVENTS', true);
    

    When I run http://localhost/project, I get the "Welcome aboard" screen, which I expected. When I added the controller name, I get a 404. Because I put no action, I assume that I would execute the "index" function. Same result. I specify an action of "listing". Same result. 404. I get no log, nor any information.

    How may I fix this bug? Thanx.

    • CommentAuthorKaste
     

    Akelos in 'Dev'-mode would more likely produce errors such as 'Controller X not found'. Or: 'No view for action X in Y'.

    If you get a real 404, then it's probably because of apache/rewrite/vhosts or whatever isnt set up properly.

    • CommentAuthoralake
     

    Because I've never gotten an Akelos program to run, I can't go back and see what I might have changed to cause the problem. I have a virtual host set up and a non-Akelos PHP program (that I am converting to Akelos) does run. So I don't think I have a problem in httpd.conf:

    <VirtualHost alan.lakeinfoworks.com>
      ServerName alan.lakeinfoworks.com
      DirectoryIndex index.html index.php index.htm index.shtml 
      ServerAdmin alan.lake@lakeinfoworks.com
      DocumentRoot /home/alan/www/html
      <Directory "/home/alan/www/html">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
      </Directory>
    </VirtualHost>
    I don't see a problem in .htaccess either as it was generated as it is here.  (It was not acceptable as an attachment.)
    DirectoryIndex index.php
    
    <IfModule sapi_apache2.c>
       php_value register_globals        0
       php_value magic_quotes_gpc        0
       php_value magic_quotes_runtime    0
       php_value magic_quotes_sybase     0
       php_value arg_separator.output    "&"
       php_value default_charset        "utf-8"
       php_value session.name           "AK_SESSID"
    </IfModule>
    
    <IfModule mod_php4.c>
       php_value register_globals        0
       php_value magic_quotes_gpc        0
       php_value magic_quotes_runtime    0
       php_value magic_quotes_sybase     0
       php_value arg_separator.output    "&"
       php_value default_charset        "utf-8"
       php_value session.name           "AK_SESSID"
    </IfModule>
    
    # On some servers this directive might be needed
    # Options +FollowSymLinks
    
    # Various rewrite rules
    <IfModule mod_rewrite.c>
      RewriteEngine on
    
      # If your Akelos Framework application is accessed via an Alias directive,
      # then you MUST also set the RewriteBase in this htaccess file.
      #
      # Example:
      #   Alias /myakelosapp /path/to/myakelosapp/public
       RewriteBase /vuokraten
    
      # If you don't want The Akelos Framework to look in certain directories,
      # use the following rewrite rules so that Apache won't rewrite certain requests
      # 
      # Example:
      #   RewriteCond %{REQUEST_URI} ^/notakelos.*
      #   RewriteRule .* - [L]
    
    
      # Rewrite URLs of the form 'index.php?ak=x':
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?ak=$1 [L,QSA]
    </IfModule>
    
    ErrorDocument 500 "<h2>Apache server error</h2>Akelos application failed to start properly"
    

    I've been trying to trace the problem since before my original post, but am no closer to a solution. Any help will be appreciated.

    • CommentAuthoralake
     

    I've continued to work on this problem and have run into an additional concern. The entire contents of my public directory (including .htaccess) has been deleted. I know that I didn't do it and no one else uses this machine, so I assume that Apache did it.

    1. Has anyone else experienced anything like it?
    2. Can I restore it by copying the contents of the public directory from Akelos, then the .htaccess file from the root?
    3. Does anyone have any ideas for identifying / eliminating this problem?
    • CommentAuthoralake
     
    I've solved this problem, but would like to close this thread by documenting what happened.

    In the previous post, I had the question (No. 2) "Can I..." I tried and the answer is "yes".

    Akelos documentation speaks of the necessity of changing the group name for each file in a project (including ./.htaccess and public/.htaccess) to that of the web server, which, in my case, is "apache". There is also the need to make group permissions read and write for these files. What I failed to realize is that processing sometimes resets these things to undesirable values and they must be set again. Because I work on a machine on which I have exclusive access, I may change my user group to "apache" and see if that keeps my permissions straight.

    Anyhow, I can now begin to program with Akelos.
    • CommentAuthorroyg4akelos
     
    Hi alake

    I am trying desperately to start with some php framework and every single one i try gives me hell...

    I am using windows with xampp 1.7 installed .
    I try the generate scaffold thing but apache gives me 404.
    I have an alias for /myProject to c:\projects\myProject\public in my httpd.conf

    pointing the browser to http://localhost/myProject is ok but http://localhost/myProject/subscriber gives me 404

    Any ideas?