It's All About Me

make them benefit

Archive for the ‘CakePhp’ Category

Cakephp, Auth and Empty Password Problem

with one comment

Auth component is excellent one that i love in Cakephp for authentication but one problem i faced with this, empty password problem. That is – to add a new user, it takes empty password if we use password field. Model validation doesn’t work for password field if we put no value in password field, because – auth component create a hashed password after the form submission with empty value, so it can pass Model validation easily. I solved it another way – here is it.
Read the rest of this entry »

Written by kodegeek

December 17, 2009 at 1:26 pm

Posted in CakePhp

Tagged with

Access Model Method from Different Controller in Cakephp

with 3 comments

In cakephp, you can call model method from same controller but sometimes you may need to call method from different model, don’t worry – you can do that too :)

Read the rest of this entry »

Written by kodegeek

December 11, 2009 at 4:10 pm

Posted in CakePhp

Tagged with

Cakephp console in windows xampp environment

with one comment

To run Cakephp console in windows environment is little tricky, atleast tricky for new Cakephp developer. A few days ago i did this stuff for Acl, Auth implementation on one of my cakephp project. Let you have installed xampp on Program Files in windows, you want to run Cakephp console for one of your project, follow the following steps –

1. Run command promt
2. Go to php folder which will be like
c:\Programs Files\xampp\php\
3. Run command similar as below to create Acl tables –

C:\Program Files\xampp\php\php.exe C:/"Program Files"/xampp/htdocs/cakepro/cake/console/cake.php schema run create DbAcl

I presumed that you are in php folder and your cake project is on cakepro folder. Hope this will helpful.

Written by kodegeek

September 12, 2009 at 4:53 pm

Posted in CakePhp

Cakephp email component bug in godaddy hosting

with one comment

I always prefer to use PhpMailer class to send email as this is enough rich. Few days ago i was working in a cakephp application build. As i found it has email component, i tried to use that to send html email, but i failed. I talked to someone else who worked with this before, he didn’t face any problem. I thought, may be it’s a problem with godaddy hosting. Then  i debugged it step by step, find out the bug and fixed it. Here are the details -

Read the rest of this entry »

Written by kodegeek

June 22, 2009 at 5:07 am

Posted in CakePhp, Php

Tagged with

how to bake on windows xampp environment

with 8 comments

Just a small note about the command that we need to run to bake cakephp in windows, xampp environment. Here is this
Read the rest of this entry »

Written by kodegeek

June 13, 2009 at 1:09 pm

Posted in CakePhp

Tagged with