Forms and redirecting

0

Redirecting in your CakePHP app My CommonComponent now contains three redirecting methods: /** * @param mixed $url * @param bool $useReferer * returns nothing and automatically redirects * 2010-11-06 ms */ public function autoRedirect($whereTo, $useReferer = true) { if ($useReferer…

Cakephp Console on Linux systems

1

You could hard-wire the Cake path into the environment. With multiple cake core versions on a single system, sometimes it is better not to do that, though. So I just follow the following guidelines: Only add the PHP path to…

Unit-Testing in CakePHP

0

Warning: Some information my be deprecated! This is still from 1.3 and SimpleTest. CakePHP now uses PHPUnit in 2.x – please see the updated article here. Some tips you might not have read about yet Since the cookbook is quite…

GoogleMapsV3 CakePHP Helper

106

This is a helper to generate GoogleMap maps (dynamic and static ones) in your CakePHP views. Note: Google Maps API V2 is marked "deprecated". API V3 is supposed to be faster and more compatible to mobile browsers. Details Also new:…

Preventing Brute Force on Login

4

With default cake login procedures a user could try unlimited passwords to one specific account. That means, if you write a bot that tries every possible combination (thousand times per minute!), this bot could eventually gain access to the account….

Complete CakePHP naming conventions

0

For details into some aspects take a look at my old "coding standards" summary. Database Database tables are plural: "comments" or "user_comments" etc. I recommend to stick to conventions and underscore + lowercase all table fields: "last_login" (instead of "lastLogin"…

CakePHP Beginner Tips

4

Based on CakePHP1.x. Valid for 2.x (see updates below). Apache Server For Windows use WAMPServer2 and select "Apache" => "Apache Modules" => "rewrite_module". Thats all there is. Cake should now work out of the box without any other modifications. Database…

Console for CakePHP

3

A Cake 2.x warning: Read the bottom part ("Hot Tip") – and do NOT add Cake to the system path anymore. Windows and CakePHP 1.x Nothing easier than that! 2 minutes and it works. I prefer WAMP (XAMPP sucks). But…