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.
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.
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.
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 to 6 of 6