posted 10/21/2009 by Chris
Comments: 0

"Subversion is a free/open source version control system. That is, Subversion manages files and directories, and the changes made to them, over time. This allows you to recover older versions of your data or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine.

Subversion can operate across networks, which allows it to be used by people on different computers. At some level, the ability for various people to modify and manage the same set of data from their respective locations fosters collaboration. Progress can occur more quickly without a single conduit through which all modifications must occur. And because the work is versioned, you need not fear that quality is the trade-off for losing that conduit—if some incorrect change is made to the data, just undo that change." - Subversion Book

posted 09/30/2008 by Chris
Comments: 0

This was originally a tutorial I wrote for bakery.cakephp.org, but it didn't get published because it was "more a general PHP tip than a CakePHP article."  Haters.

Anyways, if you're using the function usort inside of a cakephp controller and are receiving errors like "Warning: usort() [function.usort]: Invalid comparison function in...", then you may be referencing your sorting function incorrectly.  Also useful examples showing how to use Unix timestamps (date/mktime)...

posted 09/21/2008 by Chris
Comments: 0

After copying a CakePHP project (and adding a few new controllers) I was getting a "Missing Database Table" error, even though I knew the table existed.  To confuse things even more; other tables in the same database were saving and retrieving data successfully.  I searched google for a solution and came across the article "Missing Database Table in Cake PHP" on jroller.com...

posted 09/14/2008 by Chris
Comments: 0

When I started my first CakePHP project in early 2006, while still a Computer Science student at UBC, I was more frustrated than impressed.  I blame this mostly on the lack of documentation that existed back then (from what I remember there was a single blog example that always seemed outdated).   I had used Java servlets and the Spring Framework previously, so the MVC part was farmiliar, but all of the naming conventions were not.

 

What got me through these tough times?  The CakePHP IRC channel...

posted 09/8/2008 by Chris
Comments: 0

First off, I'd like to put it out there that my bias in this article partially exists to help spark debate - although it's based on my real opinion.  I think the CakePHP framework is a very helpful tool in building websites.  Although, I try to rely on cake as little as possible...

posted 09/7/2008 by Chris
Comments: 0

After waiting longer than I should have, I decided to spend the day upgrading a few cakephp 1.1 projects to use the new 1.2 core.  One word I hate to cross while upgrading an api is deprecated, and unfortunately I crossed it a few times during my upgrade...

posted 08/30/2008 by Jesse
Comments: 0

I wanted my webpage to have fullscreen mode, so I found this code that seemed to work fine. I then  found a bug. The select text cursor doesn't appear when you mouse over selectable text in full screen mode. too bad...

posted 06/10/2008 by James
Comments: 0

If you're using the function usort inside a cakephp controller and are receiving errors like "Warning: usort() [function.usort]: Invalid comparison function in..." you may be referencing your sorting function incorrectly.

 

Try calling usort this way...

posted 05/27/2008 by James
Comments: 0

Regular expressions can also help clean up input text for more aesthetic purposes. Let's assume we want to convert a blog title into URL-friendly characters...

posted 03/8/2008 by Chris
Comments: 0

Encrypting a password using the md5 algorithm is so easy that you really have no excuse not to use it for saving passwords into your database...

posted 03/7/2008 by Chris
Comments: 0

While regular expressions are often used for input validation, I also find them very useful for cleaning malicious code in user input.  For this I used the function preg_replace.  The idea is that I only allow certain characters through...

posted 03/7/2008 by Chris
Comments: 0

For such an important function, there seem to be very few examples out there...

posted 03/4/2008 by Chris
Comments: 0

Any input that you get from a user should be cleaned for malicious code.  Here are some simple functions that will help...

Tags: security, php, code
posted 02/21/2008 by Chris
Comments: 0

Details on how to turn debugging on and off, adjust session timeouts and more...

Tags: cakephp, core, code
posted 02/21/2008 by Chris
Comments: 0

Details on how to create friendly urls in CakePHP...

posted 02/18/2008 by Chris
Comments: 0

Details on how to configure which buttons to display on the editor.