Free Android CakePHP GMaps Articles by Bali Web Design

January 31, 2011

debug certificate expired android problem

Filed under: android,java — admin @ 2:18 am

I got this error message on my android projects after upgrading eclipse and android sdk manager. But it probably not the thing that makes this problem. So i explored about this problem on google and found the solution, at least this is work for my eclipse.

I am using windows Vista, here are my step to solve debug certificate expired android problem :

  1. Delete debug.keystore on C:\Users\{USER_PROFILE}\.android folder. For others operating system, you could check the path on eclipse. Please open menu Preferences – Android – Build – Default debug keystore.
  2. On eclipse, Clean the projects ( Menu Projects > Clean ). You probably need to restart your eclipse.

I figure out this problem are because the certificate is expired. I wondering if this debug keystore is same as keystore that i create when i installing the Android SDK. I don’t know, but eclipse can generate it. It seem the certificate is expired in 365 days. I hope this article can help to solve this problem.

January 19, 2011

strange id added on form create url cakephp

Filed under: cakephp,php — admin @ 9:18 pm

I found something strange on cakephp when i create form using FormHelper, a strange id appear on the action url. So i have this code on my view

<?php echo $form->create('Evoucher', array('url' => array('controller' => 'gift_vouchers', 'action' => 'buy', $giftVoucher['GiftVoucher']['amount'])));?>

It is generated a form tag with strange id added on action url. Something like this

<form id="EvoucherBuyForm" method="post" action="/gift_vouchers/buy/2/20" accept-charset="utf-8">

After exploration, i found the problem was on the controller action for buy. I have set id for the data variable

$this->data['Evoucher']['id'] = 2;

So after taking out this line, i change it into

$this->Evoucher->id = 2;

And cakephp can generate correct action url for the form tag

<form id="EvoucherBuyForm" method="post" action="/gift_vouchers/buy/20" accept-charset="utf-8">

I hope this tutorial help you. Thanks for visiting our blog