Error: The requested address ” was not found on this server

Written by: Maciej Grajcarek

Date May 3, 2008

Last night, during installation of the CakePHP application on clients production server, a weird problem appeared. All requests to controllers actions returned : “Error: The requested address ” was not found on this server”. At the same time, access to webroot was incessant.

If you have the same problem, try this three steps:

  • make sure you have an access to the database, and there are all necessary tables,
  • check if you tmp folder is writable,
  • delete all cache files from the temp subfolders.

That should fix the problem.

32 Responses to “Error: The requested address ” was not found on this server”

  1. kha said:

    so i have same problem. i have solve the problem because wrong config database :P
    thank you.

  2. javis said:

    OMG Thanks!!!!! I’ve spending so much time on it.

  3. Aularon said:

    Thanks, Deleting the cache did the trick!

  4. eric said:

    thanks! i had to clear the cache folder.

  5. jow said:

    Thanks!!
    it is solved the problems…..

  6. Chris said:

    I never would have thought of clearing the cache files, but that fixed it for me. Thanks so much!

  7. ahmed said:

    thanks!
    clearing the cache folder fixed the problem

  8. Andrés said:

    Thank you so SO much! you’ve saved my internal clock!! i can go to sleep now!

  9. daniel said:

    hi, we have had to swich our svn server, now it’s under svn.devayd.com - sorry!
    but it’s still available for anonymous access (with u: anon, pass: anon)

  10. ahmet said:

    none of the three worked for me. i tried opening the debug level in core.php (set it to 2), and cakephp told me that a helper related to the page i was trying to view was missing. so i copied the missing helper file to app/views/helpers/ and problem solved.

  11. daniel said:

    thanks ahmet

  12. ralf said:

    Missing database table for me…

  13. CakePHP – Error: The requested address was not found on this server | PHP Log said:

    [...] Die üblichen Verdächtigen in so einem Fall sind wie hier beschrieben: [...]

  14. Hanan Ali said:

    Thanks alot ! God Bless You. I was tired with this error and after reading the blog eric comment, i have get rid of this error.

  15. Laurie said:

    Missing database table for me…
    Doh! I hadn’t imported my database data!

  16. Ladik said:

    Deleting subfolders in tmp cache did the magic.

    THANK YOU FOR SAVING ME ;)

  17. online bookstore business said:

    You are great ….i hours spent figuring out what went wrong, i would be able to tackle that without this article …thanks
    —————
    Webmaster blog | library content management software

  18. vlad said:

    Thanks dude!
    1.5 years and it’s still getting comments.

    setting debug to 2 solved it for me.
    You should update the post with this rule as the 1st, people tend to forget :)

  19. farid said:

    oh man! forgot to import my table.

  20. Ajay said:

    Hello,

    I had removed the cache, then still not resolved the same problem.

    I created a same controller with different name i needed, so i copy the other controller and rename it with the new one. then same above error comes.

    Resolved:
    i created a new file and then save with new name controller which i want then copy the code from other clone controller then its works.

    I hope its OS file node issue..

    But i came late on this forum, just resolved my issue.

    I shared here, so may point to this kind of issue for other new bie.. to resolve.
    Thanks any way.

  21. vlad fratila said:

    Wow, second time I’m searching for this error, and I end up here!
    You should consider updating this page dude!

    Anyway, in your controller function, set $this->autoRender = false; and see if that works. It worked for me. And don’t forget to enable the debugger. Sometimes toggling that value solves a lot of problems.

  22. Peter said:

    I can`t repair this error. http://www.tootonga.net

  23. axel said:

    thanks, helps alot!
    ** don’t forget: set debug to 2 is very useful ;) **

  24. Vital SAP said:

    WOOOW!!!! THANKS ADVANCE!!!! i spend several days to fix this error :)

  25. Tripp said:

    Was missing a DB table and then had to clear the cache. Worked a treat. Thanks for the resource. Saved me a LOT of frustration.

  26. abhishek said:

    thank you friend…
    just now my problem is solved with your tips after scratching my head for days

  27. nico said:

    Thank’s! But my problem was, that the .htaccess in the main folder wasn’t copied with others files when I installed.

  28. hari said:

    gozzzzzilion thanks! you helped me ALOT!!!
    (cry in happines)

  29. Adam said:

    .htaccess files were missing for me. Thanks for pointing that out Nico!

  30. Daniel said:

    At the expense of re-iterating the same thing again. It’s the database stupid (this is a note to self). This article got me to look at my database config and I realized I had changed php.ini. BTW. I was also using modelbaker. and MAMP. Here are the things to check (and set them up to be the same. In my case the entries are: /Applications/MAMP/Library/bin/mysql and /Applications/MAMP/Library/bin/mysql).

    1. Modelbaker - settings - Build - MYSQL command and socket
    2. /Applications/MAMP/htdocs/conf/php5.2/php.ini (socket line)
    3. /Applications/MAMP/htdocs/conf/php5.3/php.ini (socket line)

    Hope this helps someone else as well.

  31. Jamison Bryant said:

    Hey guys,

    I spent a few minutes trying to figure this out, as I was getting the same error. Turned out my database connection parameters were wrong, but I was getting no error messages to tip me off that this was the issue. The reason? I had the Cake debug level set to 0.

    Here’s the lesson: if you can’t figure out what’s wrong, turn error reporting on!q

  32. darkman said:

    ERROR:
    The helper file app/views/helpers/box.php can not be found or does not exist

    SOLUTION:
    the filename of the helper was missing should be written in lower case.
    then it worked.

    BUT: now I have another problem can’t resolve yet:
    Cannot modify header information - headers already sent by (output started at /home/www/app/app_model.php:1) [CORE/cake/libs/controller/controller.php, line 647]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>