subdomain routing - Cake router or Apache Modrewrite

2012-02-06 Thread Shukuboy
Hi everyone, A quick one for those of you who've got your hands dirty in routing before. Need to redirect: {env}.api.website.com/*to{env}.website.com/srvc/* where {env} is the environment such as dev, testing, uat or www So far I see two options: 1) Do the whole thing in .htaccess or ap

Re: any oAuth Provider implementations for Cake or PHP

2011-12-19 Thread Shukuboy
ibrary is quite buggy and unreliable and has poor documentation. On Dec 19, 2:10 pm, ecsyle wrote: > This is most likely what you are looking forhttp://code.42dh.com/oauth/ > > On Dec 18, 5:16 pm, Shukuboy wrote: > > > Hi everyone, > > > I need to integrate an oAu

any oAuth Provider implementations for Cake or PHP

2011-12-18 Thread Shukuboy
Hi everyone, I need to integrate an oAuth Provider in my website, which allows my mobile apps (and other third party applications) to use the services of the website by means of a 2-legged oAuth authentication. Has anyone come across a good implementation of oAuth providers in Cake or PHP ? Chee

Re: How to get information in a mysql table from a different controller.

2011-11-23 Thread Shukuboy
I'm not sure if you're trying to use the Post -> Period association or the User -> Period association. As Jeremy says, If your periods table has a foreign key into the posts table, the foreign key should be period_id. You should then have the association set-up in your Post model. Bake can setup

Re: Write unit test for a controller that uses AuthComponent in CakePHP 2.0.3

2011-11-23 Thread Shukuboy
ut it still fails. I completely agree with AuthComponent being > inconsisten between the website usage and testing. I have flagged a > ticket and I'm in discussion with Mark Story about that. > On Nov 22, 7:04 pm, Shukuboy wrote: > > > Hi, > > > I've also had t

Re: Write unit test for a controller that uses AuthComponent in CakePHP 2.0.3

2011-11-22 Thread Shukuboy
Hi, I've also had to deal with testing controllers that use Auth lately.Auth has improved heaps since 1.3 but it still seems to be coupled with various bits and pieces of the core, and hence you might get different behaviours between the website and testing. I recommend mocking out Auth and g

Clean solution to sharing common Views

2011-11-14 Thread Shukuboy
Hi, I've been trying to find the best way to share a basic JSON View across my application. The view is quite simple and only contains : The view is used across the application thorough a utility method in the AppController : protected function renderJSONResponse($response) { $this -

bigint datatype in Fixtures

2011-11-09 Thread Shukuboy
Hi, I've been spending a few hours trying to work out why my unit-tests don't work, while if I run the same code on the website with the same data works fine. Well, here's the story: - I've got 2 columns of type 'bigint' in one of my database tables, on which I do comparison based lookups. Ther

Re: CakePHP 2.0 upgrade - benefit vs pain scale

2011-10-27 Thread Shukuboy
Well in my case, I've written a couple of bits and pieces myself, but haven't used too many plugins yet. Question is if there will be plenty of grief in using custom plugins working in the future ? Performance is definitely a key thing, so I might give this upgrade a try. Plus things like improv

CakePHP 2.0 upgrade - benefit vs pain scale

2011-10-27 Thread Shukuboy
ur opinion on these : - Are the non-tangible benefits of Cake 2.0 (such as performance and code clean-ness) worth the pain of upgrading ? - How much effort was involved in upgrading all your stuff to 2.0 ? - What's your experience been like so far with the new framework ? Cheers, Shukuboy

Auth password encryption

2011-10-21 Thread Shukuboy
Hi, I've been using Auth in a website under development and it seems to be working fine. The only potential concern I have is that it uses the 'salt' for generating the encrypted password, and obviously to check it against provided password during login. My question is : - Isn't md5 an irrevers

Re: Not persisting a single field of the Model

2011-10-21 Thread Shukuboy
puts, check/validate them in the model and > > then unset them from $this->data in the model when you're done. > > > Jeremy Burns > > Class Outfit > > >http://www.classoutfit.com > > > On 20 Oct 2011, at 15:26, Shukuboy wrote: > > > > Hi

Not persisting a single field of the Model

2011-10-20 Thread Shukuboy
ke to be able to validate 'Confirm' against 'Password' by specifying custom validation in the Model. I know this can be done in the controller easily but is there a way to do this in the Model ? Cheers, Shukuboy -- Our newest site for the community: CakePHP Video Tutori