Tag Archives: CakePHP

New Relic – Enable Drupal module monitoring

New Relic supports the following list of PHP frameworks.

  • Drupal 6 and 7
  • WordPress
  • CakePHP 1.2, 1.3 and 2.*
  • CodeIgniter 2
  • QDrupal
  • Joomla 1.5 and 1.6
  • Symfony 1
  • Yii
  • Zend Framework 1
  • Magento 1.5 and 1.6
  • MediaWiki
  • Kohana

If you are monitoring a Drupal website, you will find the module tab on the Application menu.

Continue reading New Relic – Enable Drupal module monitoring

CakePHP – Apply Time Zone for Users

Update @ 2012-09-25: This approach could not handle the DST zones. Thanks for the comment made by Lucas. =)

You can make use the TimeHelper to offset the time by user specified time zone. What u need is adding a new time_zone column in the users table just like the following example.

	user_id INT NOT NULL auto_increment,
	password VARCHAR(45) NOT NULL,
	time_zone DECIMAL(5,1) NOT NULL,
	PRIMARY KEY (user_id)
) ENGINE = InnoDB;

Continue reading CakePHP – Apply Time Zone for Users

Ajax implementation on CakePHP @ 3

Recently i have started another CakePHP project. i found that the example in Ajax implementation on CakePHP @ 2 should be changed as follow.


Class AjaxController extends AppController {
	var $name = 'Ajax';
	var $helpers = array('Form','Html','Javascript', 'Ajax');
	var $components = array('RequestHandler');

	function afterAjaxAction () {
		// get the $this->data to collect the form information
		// save the object to database
		// render the after_ajax_call.ctp

Continue reading Ajax implementation on CakePHP @ 3

CakePHP – Email Validation

After working for about one year, the BHJS Alumni website phase 2 is completed. But after it is deployed in production server, i found that some email addresses are regarded as invalid email address. The email validation rule which i used is provided by CakePHP. Only email addresses ended with .com, .org etc… could pass the validation rule.

So i ask the Google teacher and luckily i am not the only one to come across this problem.
Continue reading CakePHP – Email Validation