Archive

Archive for April, 2011

Undefined variable: javascript in CakePHP

April 17th, 2011 No comments

I was trying to make CakePHP dynamically add javascript and css files, but I kept getting the error Undefined variable: javascript. I was sure that I had added the Javascript helper in the app_controller. After some results on google I found out that if you misspell a helper name then CakePHP will throw this error. It has nothing to do with the object $javascript not being defined.

So I changed: 

var $helpers = array('Form', 'Html', 'Javascript', 'Time','Sessions');

to 

var $helpers = array('Form', 'Html', 'Javascript', 'Time','Session');

Session is not in plural…

Categories: CakePHP, PHP Tags:

Backspace in nano

April 13th, 2011 No comments

If backspace in nano does a forward delete instead of deleting the character to the left, then open the file /etc/nanorc and comment out the line set rebinddelete.

This should fix the "problem".

Categories: Uncategorized Tags: