FilChi Weblog

Archive for the ‘cakephp’ Category


Yes, cakephp lovers may now download an 1.2 RC1 versionĀ  at http://cakephp.org/downloads.

I can’t wait to try it out its newest features and learn which are removed from previous versions and which areĀ  newly added.


Why do I hate the “noob” word? Some people might misinterpret someone called “noob” as being stupid. Let me clarify its meaning: noob means newbie, people! And that means, you are basically somewhat new to something. Being noob is not the same as being not knowledgeable about all things. I won’t let anyone call me a “noob” anymore. try me. dare me. make my day…

I just don’t get it. I didn’t say “you’re a noob” to anyone. But I am called a noob?! Grrr….


If it happens to you that when you add a new record when scaffolding in cakephp 1.2 beta version, check if your mysql version is 5.1 or later, and check in my.ini of your mysql server and remove that “STRICT_TRANS_TABLES” setting, and then your cake scaffold will work just fine.

(source: http://groups.google.fr/group/cake-php/browse_thread/thread/a0b1a35c1909d5db )

Note: I think this is just a temporary fix. I was informed in irc that this bug is already fixed. It is advisable to get the latest code thru svn.


If you want to call a controller/action in crontab, you simply must:

1. create a copy of index.php in your app’s webroot directory,
and rename it to cron_dispatcher.php or to any filename.

2. after this, somewhere in line 78 of index.php of your app’s webroot directory,

require CORE_PATH . ‘cake’ . DS . ‘bootstrap.php’;

put code:

if($argc == 2) {
$Dispatcher= new Dispatcher();
$Dispatcher->dispatch($argv[1]);
}

this code will get argument from php commandline having index = 1.

so, in your crontab,

* * * * php -q /var/www/html/cake/webroot/cron_dispatcher.php Controller/action


In CakePHP 1.2 beta version, when you attempt to use/set Sessions in app/config/core.php, you might encounter this problem:

Fatal error: Class ‘ConnectionManager’ not found in CORE/cake/libs/session.php on line 704.

When I tried changing these settings:

Configure::write(‘Session.save’, ‘database’);
Configure::write(‘Session.table’, ‘cake_sessions’);
Configure::write(‘Session.database’, ‘default’);
Configure::write(‘Session.start’, false);

The error appears.


Flickr Photos