Monthly Archives: December 2011

WordPress Permanlinks not working on WAMP – How to fix?

Was trying to enable permalinks in wamp for my wordpress installation and all i was getting was a page not found error.

To fix it this is what i did,

clicked on the wamp icon on the taskbar,

in wamp menu go to,

Apache -> Apache Modules -> enable mod_rewrite

Apache will automatically restart and then your permalinks will work.

Yii Framework.. my implementation

I used Yii framework successfully to create a raid management system for Sri Lanka Consumer Affairs authority. I have hosted a demo version at this site so that you might check it out. Let me know what you think.

http://iraid.host.org

username – admin

password – 123456

Currently I’m trying to create a hotel reservation system for a travel agent using yii. lets see how it goes. 🙂

PHP – Day Of Week Conundrum

I wanted to get the day of week from a string date in PHP and was running into some problems. It seems that you cant just get the day of week by passing the date string to the date() function like,

$dayOfWeek = date( “w”, ‘2011-12-25’);

This would give an error. What you have to do is to convert the date string to a unix time object and then pass that value to the date() function to get the day of week. like,

$date = strtotime(‘2011-12-25’);
$dayOfWeek = date(“w”, $date);

this would give the day of week as a number with Sunday => 0, Monday => 1 … till Saturday => 6.

Small thing but lots of headache. 🙂

resources to check out,

http://php.net/manual/en/function.date.php