Develop a full application using CakePHP

August 29, 2008

James Fairhurst has come up with an excellent series of postings on how to build a full application using CakePHP. It is a wonderful tutorial for newbies who are starting on CakePHP. Thanks James!

Follow the whole series here: http://www.jamesfairhurst.co.uk/tags/view/cakephp/


Inserting Unicode into MySQL

August 26, 2008

If Unicodes end up as funny characters after inserting into MySQL, then try executing SET NAMES ‘utf8′ immediately after obtaining a DB connection. For example:

$link = mysql_connect(‘localhost’,'myuser’,'mypassword’);
mysql_query(“SET NAMES ‘utf8′”);
mysql_select_db(‘mydb’);

References: http://www.adviesenzo.nl/examples/php_mysql_charset_fix/


Disable Windows DNS Cache for Unresolved Names

August 25, 2008

Windows XP by default caches DNS lookups. To disable this caching behaviour, add 3 DWORD values to the registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters

  • NegativeCacheTime = 0
  • NetFailureCacheTime = 0
  • NegativeSOACacheTime = 0

References: http://www.modemsite.com/56K/backbone2n2.asp