Wednesday, January 18, 2012

Cakephp DebugKit css/js issue

If you are using cakephp develope your website , you should definitely checkout the DebugKit. A nifty tools to help smooth out your debugging experience 

after following the instruction for installation , you might have notice that Cakephp will require you to load the plugin using cakephp::load('DebugKit') and according to CookBook 2.0 ( I assume you are using 2.0+ ) 

New for CakePHP 2.0, plugins need to be loaded manually in app/Config/bootstrap.php.
You can either load them one by one or all of them in a single call:
<?phpCakePlugin::loadAll(); // Loads all plugins at onceCakePlugin::load('ContactManager'); //Loads a single plugin

You must put the code in bootstrap.php else the css/js will not get loaded.

Friday, January 13, 2012

不安

心中一直有一份明显的不安。
担心什么呢?其实我一直不懂,也想不起来
如果有谁可以解除我的不安,他将是我世界的神

可是或许这份不安是驱动我一直向前的动力呢?
我想消除它吗?
不安的心里,源头到底是哪里?
对于不安的不安,可能这才是源头呢?

无法得知源头,就无法消除。
那么,我到底在担心什么?
你,或者谁都好,可以告诉我源头在哪里吗?
其实我已经有点头绪,但是结论是绝望的。
我不想承认这是源头,因为它可能不是,只是非常接近源头而已。

或许我应该和谁谈谈,谁呢?
我无法将身躯依靠再任何一人的身上,因为这份不安。
无法依赖就无法通过别人寻找源头。

源头,不安,不安。
你,可以拯救我吗?
我,想被拯救吗?

Friday, January 6, 2012

Configuring subdomain on Apache2 Ubuntu

Im trying to install cakephp on my box.
While i can always try to expand the whole cakephp folder into /var/www but I want separate the folder which can be accessed using different name.

http://localhost/cakephp seems like giving the weird looking index.php so i decide to use http://cake.localhost to see if I can make the page look normal.

here is the step I took

$cd /etc/apache2/site-availables
$ sudo gedit ./cakephp

add the following
<VirtualHost *:80>
    DocumentRoot /var/www/cakephp/
    ServerName cake.localhost
</VirtualHost>

$sudo gedit /etc/hosts
add this line
127.0.0.1             cake.localhost

$cd /etc/apache2/site-enabled
$sudo ln -s ../site-available/cakephp ./cakephp

restart the apache server
$/etc/init.d/apache2 restart

note: if you see the warning message like "unable to resolve servername"
add this
$echo "serverName localhost" >> /etc/apache2/httpd.conf


Dont exactly know what happened on everything, since it work and Im happy with it