Geoff Garbers

Husband. Programmer. Tinkerer.

CakePHP 1.3 - An internal error has occurred.

Mar 30, 2011

When you see the following problem on cake:

<h3>An Internal Error Has Occurred<br />
<span style="font-size: 13px;font-weight: normal">Error: An Internal Error Has Occurred.</span></h3>

This is CakePHP’s new way of telling you something went wrong. You should switch on debugging in app/config/core.php.

Change it from:

Configure::write('debug', 0);

to:

Configure::write('debug', 2);

If you don’t want to switch debugging on, check your app/config/database.php file. You have either not specified the correct database details or the database might not even exist at all.

Also ensure that your CakePHP 1.3 instance has access to the database. This is the only way to get rid of the “Internal Error Has Occurred” message. Obviously there might be other problems but this is the main cause of this error on CakePHP 1.3

Hope this helps anyone else who struggled to find the answer!

Edit: found via Christoff Albertyn of phpin24.co.za fame, and reblogged with his permission.