Monday, January 26, 2009

Changing CakePHP's tmp directory so it won't be included on SVN

Update: this solution is quite dirty, and I don't recommend it now. Check out my new post on using SVN's ignore property to ignore CakePHP's tmp directory.

If you're putting your CakePHP app on version control (SVN), you'll notice that the /tmp directory is inside /app. You might want to not include /tmp on your repository as it's just a location for caches, logs, session, and other temporary stuff which is not part of your application code. Here's how to change the tmp directory of CakePHP:

1. Copy /app/tmp to /tmp (copy it outside of the app directory)
2. Add this code on /app/webroot/index.php after CAKE_CORE_INCLUDE_PATH is defined (line ~60). This will change the tmp directory from /app/tmp to /tmp.
# define a different TMP dir outside of app
define('TMP', ROOT.DS.'tmp'.DS);
3. Configure the file cache path on /app/config/core.php (line ~226):
Cache::config('default', array('engine' => 'File', 'path' => ROOT.DS.'tmp'.DS) );
(This step is necessary for BAKE to work properly if you are using the default file cache)
4. To check if it's working fine, try renaming /app/tmp to /app/xtmp and see if your app still works properly (then you can already delete that directory). If not, make sure the new tmp directory is the same as the original structure (cache, logs, sessions, tests)

Friday, January 23, 2009

Things I love

I want to write something positive to end the day. So here, I'm writing about the things I love.. at least those that come to my mind right now ;)

Web Development.
It's what I do. Sometimes it pays, sometimes it doesn't. I love it either way ;) I can't spend a week without coding something. I'm currently enjoying CakePHP.

I love music. It helps me work everyday. I'm really into Saves The Day right now. I also listen to a lot of emo punk and Japanese stuff. Too many to mention haha. I wish I could write about each of them. Oh and I'm also part of a band called Nelo at ang Tala. We're currently recording our demo and I'm so excited about it. Watch out ;)

iPod Touch really fits me. I love reading and listening to music. iPod takes care of my music, and Instapaper takes care of my reading. If you like reading blogs then try it out! It's free and I promise it won't let you down.

Hacker News.
This is where I get stuff to read. Hacker News + Instapaper = :)
If you like reading Hacker News on weekly mode, check out my project hnweekly

Yeah I usually sleep late.. but I get lots of it!

That's it for now.. I'm sleepy. I'm sure I missed out a lot.

Friday, January 16, 2009

Moving to DreamHost

Wow it took me (just) 2 days to move my sites from NearlyFreeSpeech (NFS) to DreamHost (DH) :) I thought it would take a year haha. It's been smooth sailing on DH so far, I'm enjoying all the features included (everything's unlimited!!). If you're not yet familiar with DH, check out their hosting, some features worth noting are: unlimited domains, unlimited storage, unlimited bandwidth, unlimited databases, ssh access, user accounts, svn hosting.. ahh the list goes on. I also like the simplicity of their control panel.

I have to say I've had a good experience with NearlyFreeSpeech after 2 years of hosting with them. It's the perfect place to learn things and play. NFS charges you depending on usage, which really just costs very little if you're just trying out stuff. Bandwidth, storage, and database will just cost you around $0.03 per day. But as my projects grew, the storage costs also grew. Well, not really much but it came to a point that I don't want to worry about it and just go unlimited at DH.

I'm glad I tried (possibly) the 2 best shared hosting available. I'm not expecting a super awesome time at DH, it's shared hosting after all :) If the time comes that one of my websites demand dedicated resources, then maybe it's time to try out VPS hosting (Linode seems to be a good deal). Right now I'm still enjoying DH.

.. yeah and I sound like a fanboy right now ;)

(If you're curious what websites I host on DreamHost, two of them are and hnweekly)

DreamHost super offer: $50 discount on yearly hosting! enter the code HNWEEKLY when you sign up!

Saturday, January 10, 2009 Social Music Charts on Facebook Connect

Hello there! please try out my latest project :) is a Social Music Charts website where you can vote for your favorite songs and discover new music. Lots of charts for different genres. It uses Facebook connect so there's no need to sign up if you already have a Facebook account.

Thursday, January 8, 2009

Fixing "Another blog is already hosted at this address" error on Blogger

I've had this problem with Blogger many times when I can't use as the custom domain. It returns an "Another blog is already hosted at this address" error. Here's an easy fix that worked for me:

1. Go back to using the * address
2. Login to Google Apps (or sign up if you haven't). If you don't know Google Apps, this is Google's free service so you can use your domain with their services for free (gmail, docs, sites, etc)
3. On the Dashboard, click "Sites" (on Service Settings).
4. Click the "Web address mapping" tab
5. Delete the "" entry. This is the DNS setting that conflicts with blogger when you type as your custom domain.
6. Go back to blogger and set as your custom domain. It should work this time!

The next thing to do is redirect the bare domain ( to This is covered on this blog post from Consuming Experience:
Blogger: how to use a www custom domain for your blog

That's it! have fun!