Recent Posts

Saturday, April 28, 2012

Wordpress scheduled post doesn't get published on scheduled time (Resolved)

I tried to publish my post in future scheduled time but unfortunately it didn't get published even after hours. And i started to Google about the problem and found some interesting posts regarding this issue.
Some said it will get published 1 hour late as WordPress server time is always 1 hr late but for me it didn't work even after hours.

Then i realized if WordPress checks for its server time which might be in US somewhere for publishing the post then I will have to wait a long time if i try to publish in Australian time. So i found out that actually WordPress uses UTC time and then i changed by my scheduled to match UTC time and it worked like a charm. All my scheduled posts are published successfully.

Below article explains more about word press time and scheduled post irregularities.
timestamp and scheduled post irregularities 


Read more!

Monday, January 23, 2012

Move your WordPress website from localhost to production site

Wordpress is pretty cool tool for blogs, i was just learning the bits and pieces of wordpress and completed a blog.
It was fairly easy to download wordpress and setup in wamp server in localhost environment. However i got stuck for a while when uploading things to my production server, I tried some help from websites but none were complete as www.ostraining.com.

Check out here how to Move Your WordPress Site From Localhost To Your Production Server


Read more!

Tuesday, January 10, 2012

he debugger does not support debugging managed and native code at the same time on this platform in .net 2008 64 bit

I came across the project in .net 2008 which would debug normally in 32 bit operating system but would give me error while debugging in 64 bit. After some research i found this very good article and thought it would help all.

To fix this you can check This Link


Read more!

Tuesday, August 23, 2011

Cake PHP losing session in Google Chrome

I was having problem where i was losing my sessions and when i logged in as admin after every click i would have to login again.
After few searches i found out below article on pixelastic that was pretty helpful...

It might help you guys

losing-session-request-cakephp-chrome


Read more!

Tuesday, August 9, 2011

Avoid Undefined Index in CakePHP

There might be various problems regarding to undefined index in CakePHP and there are many solutions to it and some links i went through to fix the problem are:

Newby: "Undefined index" error
Something on CakePHP Notice (8): Undefined Index
CakePHP: Rendering an undefined index

However these couldn't help solve my problem, being newbie in Cake and after going through these posts, it clicked me that i might be doing something silly mistake.

Actually i was displaying news in my default page where I declared the variable news in apps_controller as below:

function beforeRender(){
$this->loadModel('News');
$todayNews = $this->News->find('first', array( 'order' => array( 'News.updated' => 'DESC' ) ) );

$this-> set('news', $todayNews);

}

And in my news controller I was using below code to render my index page:

function admin_index()
{
$allNews = $this->News->find('all',
array(
'order' => array
( 'News.updated' => 'DESC' ) )
);

$this -> set('news',$allNews);
}

You can see both had "news" being set. So when i called my index page i was always getting

Notice (8): Undefined index: News [APP\views\news\admin_index.ctp, line 18]

This made me go round and round for an hour... finally found out ti was the same variable causing problem.

then I changed the variable in my app_controller to be


function beforeRender(){
$this->loadModel('News');
$todayNews = $this->News->find('first', array( 'order' => array( 'News.updated' => 'DESC' ) ) );

$this-> set('displaynews', $todayNews);

}
and called the same in my default layout page and all worked like a charm... hope this will help save you some time that might use creatively..... Enjoy coding.


Read more!