#1
  1. No Profile Picture
    got Rice?
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Posts
    518
    Rep Power
    11

    [CakePHP] - Favicon.ico Error in Logs


    My CakePHP error.log is full of errors (well, Favicon.ico)

    PHP Code:
    2013-06-24 11:12:54 Error: [MissingControllerExceptionController class Favicon.icoController could not be found.
    Exception Attributes: array (
      
    'class' => 'Favicon.icoController',
      
    'plugin' => NULL,
    )
    Request URL: /favicon.ico?url=favicon.ico
    Stack Trace
    :
    #0 //http/app/webroot/index.php(109): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
    #1 {main} 
    favicon.ico is in the /app/webroot/favicon.ico .

    And even so, I don't even have the favicon html in my templates either. So I don't even know why it would be requesting it in the first place
    Last edited by jaeSun; June 24th, 2013 at 02:25 PM.
  2. #2
  3. No Profile Picture
    Dazed&Confused
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2002
    Location
    Tempe, AZ
    Posts
    506
    Rep Power
    128
    Originally Posted by jaeSun
    My CakePHP error.log is full of errors (well, Favicon.ico)

    PHP Code:
    2013-06-24 11:12:54 Error: [MissingControllerExceptionController class Favicon.icoController could not be found.
    Exception Attributes: array (
      
    'class' => 'Favicon.icoController',
      
    'plugin' => NULL,
    )
    Request URL: /favicon.ico?url=favicon.ico
    Stack Trace
    :
    #0 //http/app/webroot/index.php(109): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
    #1 {main} 
    Don'tcha love how frameworks make life easier?

    favicon.ico is in the /app/webroot/favicon.ico .
    If Cake works like I suspect it's supposed to, then that file actually being present should prevent your PHP from even being called.

    Maybe there's a problem with your .htaccess configuration.

    And even so, I don't even have the favicon html in my templates either. So I don't even know why it would be requesting it in the first place
    Browsers look for it, themselves.
  4. #3
  5. No Profile Picture
    got Rice?
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Posts
    518
    Rep Power
    11
    Yeah, forgot that browsers look for it :|

    The file IS there. Always has been. I have deleted it, reuploaded it, uploaded a different one, uploaded a copy to the /app directory, the /http directory.

    The .htaccesss file hasn't been touched since installation (i am just using whatever .htaccess came with cakephp).

    .htaccess in /webroot
    Code:
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php [QSA,L]
    </IfModule>
    .htaccess in /app
    Code:
    <IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteRule    ^$    webroot/    [L]
        RewriteRule    (.*) webroot/$1    [L]
    </IfModule>
    Last edited by jaeSun; June 24th, 2013 at 02:44 PM.
  6. #4
  7. No Profile Picture
    Dazed&Confused
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2002
    Location
    Tempe, AZ
    Posts
    506
    Rep Power
    128
    Not sure how you'd have one higher than the webroot, but I'll assume the latter one is "just in case" thing.

    That said, the one IN webroot seems right.
    Have you tried putting other files alongside the favicon to see if those load up directly? Just a generic test .html or something.

    Also check that the file permissions allow the favicon to be readable by the webserver.
  8. #5
  9. No Profile Picture
    got Rice?
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Posts
    518
    Rep Power
    11
    Originally Posted by dmittner
    Not sure how you'd have one higher than the webroot, but I'll assume the latter one is "just in case" thing.

    That said, the one IN webroot seems right.
    Have you tried putting other files alongside the favicon to see if those load up directly? Just a generic test .html or something.

    Also check that the file permissions allow the favicon to be readable by the webserver.
    yeah, it was just a just in case thing

    I put another file in there, doesnt seem to load.

    file permissions are fine.

    I can load css files if i load them directly(www.website.com/css/mycss.css) but going to css directory gives 404 (www.website.com/css). but i imagine that is normal
  10. #6
  11. No Profile Picture
    Dazed&Confused
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2002
    Location
    Tempe, AZ
    Posts
    506
    Rep Power
    128
    Well... I'm at a loss. It sounds like everything is configured as it should be.

    I'm not sure of how much value it'd be, but maybe try print_r($_SERVER); at the top of your index.php, just to see what PHP is being served. Maybe something in there will stick out as odd.
  12. #7
  13. No Profile Picture
    got Rice?
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Posts
    518
    Rep Power
    11
    Originally Posted by dmittner
    Well... I'm at a loss. It sounds like everything is configured as it should be.

    I'm not sure of how much value it'd be, but maybe try print_r($_SERVER); at the top of your index.php, just to see what PHP is being served. Maybe something in there will stick out as odd.
    well, i said F it and just edited the CakeLog to not write anything if it has Favicon.ico in the error message and will try to figure it out another day.
  14. #8
  15. No Profile Picture
    got Rice?
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2004
    Posts
    518
    Rep Power
    11
    pretty sure i figured it out.

    apparently, we aren't on apache, but lighttpd, and thus the .htaccess wasnt being used, and now looking at the redirects that was setup, it's what is causing the errors.

IMN logo majestic logo threadwatch logo seochat tools logo