FilChi Weblog

Archive for the ‘Developer’ Category


I thought I should share with my fellows this function I just created to get the first monday of the month using PHP.

Read the rest of this entry »


I just went to the ##php channel in irc.freenode.net to ask the great gurus about the opposite of ‘===’ .
Here is the excerpt of our discussion:

Read the rest of this entry »


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.


Email from Mark William Campillanes is shown below:

Hi,

An International Company is greatly in need of a Ruby on Rails
Programmer. The post offers a promising career growth and of course a very
competitive compensation package. I decided to shoot an e-mail to you
because I just would like to ask and also try out if ever you can refer or
you know someone who is apt for the position. I am very much willing to
discuss further the details of the above-mentioned job vacancy to qualified
and interested individuals. This is for a permanent employment. We are
sincerely eyeing for someone who can lead the account with sufficient
knowledge and background in ruby on rails. We are very much willing to
elaborate the lucrative components of this post. You can reach me at
0916-5812765

Thank you so much

God Speed!

Mark


Flickr Photos