CakePHP 500 Internal Server Error

Software

  • CakePHP

Server Environment (shared)

Problem Description

  • Upon installing CakePHP you receive the following error:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log. 

Solution

This error is caused by ModRewrite issue.  The solution is to modify you .htaccess files to adding a leading slash to urls.

  1. Open /.htacess file
  2. On line 3 change ^$ app/webroot/ to ^$ /app/webroot/
  3. On line 4 change (.*) app/webroot/$1 to (.*) /app/webroot/$1
  4. Save, close and upload the file to the server
  5. Open /app/.htacess file
  6. On line 3 change ^$  webroot/ to ^$ /webroot/
  7. On line 4 change (.*)  webroot/$1 to (.*)  /webroot/$1
  8. Save, close and upload the file to the server
  9. Open /app/webroot/.htacess file
  10. On line 5 change ^(.*)$ index.php?url=$1 to ^(.*)$ /index.php?url=$1
  11. Save, close and upload the file to the server
  12. You are done.