Use an absolute path to the CakePHP libs.

--- a/cake/console/cake.orig	2012-06-26 17:19:31.000000000 +0100
+++ b/cake/console/cake	2012-06-26 17:19:43.000000000 +0100
@@ -26,9 +26,9 @@
     LIB=$(cd $DIR && cd $(dirname -- "$SYM") && pwd)/$(basename -- "$SYM")
 done
 
-LIB=$(dirname -- "$LIB")/
+LIB=/usr/share/php/cake/console/
 APP=`pwd`
 
 exec php -q ${LIB}cake.php -working "${APP}" "$@"
 
-exit;
\ No newline at end of file
+exit;
