CakePHP

From XennisWiki
Jump to: navigation, search

CakePHP is an open source web application framework. It follows the Model-View-Controller (MVC) approach and is written in PHP, modeled after the concepts of Ruby on Rails, and distributed under the MIT License. (Wikipedia)

Installation

Ggf. kann noch das DebugKit für Cake und eine Lokalisierung heruntergeladen werden.

Shell integration

Ausführliche Hilfe: Console and Shells

Voraussetzung

Installation

  • Erweitere die Umgebungsvariablen PATH um den Pfad zu dem Verzeichnis 'app\Console'
  • Tippe das Folgende in die Konsole zum Testen ein
cake

IDE integration

NetBeans

see plugin PHP CakePHP Framework

Problems and errors

500 Internal Server Error

Error

When you access the Cake application you get the error: 500 Internal Server Error.

Solution[1]

Add in the file .htaccess in the root directory the line RewriteBase /:

<IfModule mod_rewrite.c>
   RewriteEngine    on
   RewriteBase      /
   RewriteRule      ^$ app/webroot/    [L]
   RewriteRule      (.*) app/webroot/$1 [L]
</IfModule>

If necessary also add this line in the files app/.htaccess and app/webroot/.htaccess.

Install the DebugKit

  • Clone the DebugKit from GitHub into the folder app/Plugin. Hence you should find it after cloning in the directory app/Plugin/DebugKit
  • Add in the file app/Config/bootstrap.php the following line
CakePlugin::load('DebugKit');

References

External links