JavaEar 专注于收集分享传播有价值的技术资料

An internal error has occured

I'm Vaijanath. I'm using cakephp installed on lamp. Now i have created a blog application, but when i run this on localhost/cakephpproject/cakephp/ it is showing an error:

"An Internal Error Has Occured".

And i had changed the "routes.php" in "/app/Config/routes.php" from

"Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'home'));"


"Router::connect('/', array('controller' => 'posts', 'action' => 'index'));"

This is an internal error and i'm not able to solve it. Could you please help me in this?


  1. Is your project in your user's public_html dir ?

    If so, you must update the three .htaccess files, located in <projectBase>/, <projectBase>/app/ and <projectBase>/app/webroot, and add the following code after each RewriteEngine on statement :

    RewriteBase /~<yourUserName>/<projectBase>/

    Hope that helped.

  2. 参考答案2
  3. In your CakePHP app in the ‘config’ folder change the following setting in the ‘core.php’ file Configure::write(‘debug’, 0); Change the ’0′ value to a ’2′ and CakePHP will print all debug errors.

    It will display all the errors.. and when the functions works then again change it back to 0.