Detaching a PHP script from the shell on Ubuntu

I've learnt that detaching a PHP script from the shell and allowing it run as a daemon on Ubuntu is not as simple as I first thought.  I couldn't simply add an ampersand like this:

$ php ./script &

Read more...

PHP Mode for emacs on Mac OS X

It's been a long time since I figured this out and I can't remember what resource I used to help me. Anyway to get PHP Mode working with the native emacs bundled with Mac OS X do the following:

$ mkdir elisp; cd elisp
$ wget http://bit.ly/cLqD47

Read more...

Name of current module controller or action from Yii view

I've been using Yii framework a fair bit recently and it seems very nice so far.  However I couldn't easily find out how to get hold of these often essential pieces of information from a Yii view.  Useful in situations where you want to build a navigation user interface element etc. This is all you need to know...  

// Module
if(isset($this->module)): echo $this->module->getName(); endif;

// Controller
echo $this->ID;

// Action
echo $this->action->id;