Forums are in read-only mode while we transition to new software.
I am unable to run simple kohana project that runs in windows in my ubuntu 12.04. ERRO CODE 404
  • Hello Everyone,

    Forgive me the cross posting but this subject is started by me at StackOverFlow. I am posting the same here for 3 reasons, the first one because it makes sense to post my kohana worries in kohana forum, the second one is because so far i've not got any conclusive explanation of my problem, the third one is because my request being a member of kohana community is granted.

    To simply put my issue: i have dual booting ,windows 7/ubuntu12.04 on 2 separate partitions. both oses access the third partition where my project is located.In windows the project itself works fine (except routing issue for "/" path). the same project in my /var/www/admin with even chmod 777 for the whole folder it still doesn't seem to see the files in there.I've verified the mod_rewrite (ref the StackOverFlow thread) but still.the install page is all green as well. my configs are on pastie.org

    i've just started a new fresh kohana project from the ubuntu os and only the default 'hello work' from the controller welcome shows up. any sibling controller is not seen. I'm hoping i could have some help from the community. Thanks for reading this

  • What version of kohana are you using?

    Also, problems that show up on windows and not linux are often related to case-sensitivity in file names.

  • To add to @digby's note: All class file names and directory names are lowercase.

    There are a few little things I noticed but nothing that could explain the problem you are having:

    • Query strings should not be and are not used to route to an action. Use $this->request->query() in controllers to use GET values.
    • Slashes get trimed off the beginning and end of URI's, so the optional / in the commented out 'def' route is useless.
    • The second time defining the kendogrid route overwrites the old one. Not that it really matters since they are the same, so why not remove one?

    What controller do you expect to be routed too? Currently it should be Controller_... Hmm... I spy with my little eye a typo! 'susbcribers' instead of 'subscribers'. So currently you will be routed to Controller_Susbcribers::index().

    I you want the Controller_Useraccess::index() instead of Controller_Subscribers::index() (assuming you fix the typo) remove the first kendogrid route since both 'kendogrid' and 'default' match an empty URI.

    PS. I am assuming you use 3.2

  • It looks like you have rewrite problems. Make sure you have enabled "AllowOverride all" on apache's httpd.conf. Not familiar with Ubuntu but it is somewhere on /etc/httpd/httpd.conf or something similar.

  • On ubuntu, I think they like the "AllowOverride all" in /etc/apache2/sites-available/<whatever you're using here>

  • Once I had same problem when I published my local site to my hosting. You can try to use in your .htaccess this code:

    #RewriteRule .* index.php/$0 [PT]
    RewriteRule .* index.php?kohana_uri=$0 [PT,L,QSA]
    
  • Wonderful people,

    am so pleased by all these suggestions and answers. I've taken notes of all your advice. the error was in fact due to the AllowOverride all pointed out by @lysender and the right location was pointed by @digby it's working now.

    For those who would find themselves in the same situation, i just changed AllowOverride None to AllowOverride all in /etc/apache2/sites-available/default for <Directory /var/www/>

    
            ServerAdmin webmaster@localhost
    
            DocumentRoot /var/www
            
                    Options FollowSymLinks
                    AllowOverride None
            
            
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride all
                    Order allow,deny
                    allow from all
            
    
            ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
            
                    AllowOverride None
                    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                    Order allow,deny
                    Allow from all
            
    
            ErrorLog ${APACHE_LOG_DIR}/error.log
    
            # Possible values include: debug, info, notice, warn, error, crit,
            # alert, emerg.
            LogLevel warn
    
            CustomLog ${APACHE_LOG_DIR}/access.log combined
    
        Alias /doc/ "/usr/share/doc/"
        
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
            Deny from all
            Allow from 127.0.0.0/255.0.0.0 ::1/128
        
    
    
    
    
    

    thanks to @Darsstar and @wadyasha as well

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion