Re: Extremely slow > 5000 ms response time with Cake PHP, please help

2010-10-04 Thread Jeremy Burns | Class Outfit
I'm surprised how seldom people index their databases properly (if at all)... http://articles.classoutfit.com/2010/02/cakephp-basic-database-table-tuning-tips/ Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 08:09, Crazy wrote: > I

Re: Security: Token is not accepted anymore when creating/updating user

2010-10-04 Thread Jeremy Burns | Class Outfit
If you get stuck and just want to move past this problem, you side step the Security component on one or more specific actions: if ($this->action == '<-action_name->'): $this->Security->validatePost = false; endif; Jeremy Burns Class Outfit jeremyb

Re: views - force inputs to sit together

2010-10-04 Thread Jeremy Burns | Class Outfit
CSS. Examine the html output and apply styles as necessary. One head start is to add 'div' => false to your inputs - divs by default are block level, which means they go onto a new line. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2

Re: ACL and multiple groups

2010-10-04 Thread Jeremy Burns | Class Outfit
s when the User already belongs to a Group - and it is the Groups that I usually want to assign permissions to. Am I just being dim (it is possible!)? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 17:55, calzone wrote: > The most maddening

Re: ACL and multiple groups

2010-10-05 Thread Jeremy Burns | Class Outfit
I'm going to roll my own and if I am successful (which I have to be because I need this to work) I'll publish the code. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 19:39, calzone wrote: > I wondered about that user row as w

Re: save not working

2010-10-05 Thread Jeremy Burns | Class Outfit
See the guide: http://book.cakephp.org/view/1031/Saving-Your-Data save(array $data = null, boolean $validate = true, array $fieldList = array()) Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 14:32, james wrote: > Following on from this -

Re: Debugging the Email component

2010-10-05 Thread Jeremy Burns | Class Outfit
an to flow through. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 17:02, Jeremy Burns wrote: > I am using the Email component with varying levels of success. A > single function that can send a number of emails sometimes works, > someti

Re: Debugging the Email component

2010-10-05 Thread Jeremy Burns | Class Outfit
a bit random. I'm not blaming the email component - I just wish there was a better way of tracking down those sort of errors. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 18:09, j.blotus wrote: > 99% of the problems I ever had with E

Re: CSS Frameworks like Uni-Form for CakePHP?

2010-10-05 Thread Jeremy Burns | Class Outfit
I use http://960.gs/, not so much for style (as it's pretty plain) but for layout. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 19:34, euromark wrote: > what you need is > http://www.yaml.de/ > or > http://www.blueprintcss

Re: Bake templates

2010-10-06 Thread Jeremy Burns | Class Outfit
Got it: if ($schema[$field]['type'] == 'datetime'): Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 6 Oct 2010, at 16:51, Jeremy Burns wrote: > I am creating my own templates for baking views (I spend the time > getting that ri

Re: blog tutorial Html->link problem

2010-10-06 Thread Jeremy Burns | Class Outfit
s were written for earlier versions and need to be updated - perhaps I'll take that on when a get a bit of time. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 20:45, J. Argyl Plath wrote: > Hello. I am following along on the blog t

Re: How can i access home page without login?

2010-10-06 Thread Jeremy Burns | Class Outfit
Do you have a pages controller? If so, adding: parent::beforeFilter(); $this->Auth->allow('display'); ..in your beforeFilter() ought to work. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Oct 2010, at 21:31, redleon wrote: > I

Re: Cascading Models in "hasone"

2010-10-06 Thread Jeremy Burns | Class Outfit
ple = $this->Person->find( 'all', array( 'contain' => array( 'Adult' => array( 'User' ) ) ) ); You'll see that it m

Re: Beginners question about adjusting views

2010-10-06 Thread Jeremy Burns | Class Outfit
) ) ) ); $this->set('contact', $contact); Then in your view you can do: To see what the full array looks like, do this in your view: die(debug($contact)); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.c

Re: Fatal error: Out of memory - Even when there is no memory limit

2010-10-06 Thread Jeremy Burns | Class Outfit
ences between the servers. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 16:28, Fuitad wrote: > Hello, > > I'm in charge of transferring a live CakePHP application from one > server to another. I'm trying to get the new site

Re: Cakephp using flaot on part part of a website and removing it on another

2010-10-06 Thread Jeremy Burns | Class Outfit
Sounds like you need to set up a different layout file that has different div ids/classes, and then apply css appropriately. http://book.cakephp.org/view/1080/Layouts Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Oct 2010, at 20:27, ninja wrote: > H

Re: help to slove this

2010-10-06 Thread Jeremy Burns | Class Outfit
Cake ships with a default salt value. The salt value is used for encrypting passwords and the like. You are supposed to change it to something unique to your site. Change it in /app/config/core.php Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 6 Oct 2010

Re: redirect not working

2010-10-06 Thread Jeremy Burns | Class Outfit
ssion flash: $this->Session->setFlash('Congratulations, your new account has been successfully created'); ...and then echo it out in the view you are sending them to: echo $this->Session->flash(); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.

Re: What's your opinion: database views VS complex join conditions?

2010-10-07 Thread Jeremy Burns | Class Outfit
plex joins so I'd say you were leveraging its native power. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 8 Oct 2010, at 03:36, Michael T wrote: > Hi all, > > In attempt to solve a particular problem, I've tried a solution which > to m

Re: Why is this SQL query so slow?

2010-10-08 Thread Jeremy Burns | Class Outfit
What are your indexes like on your table? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 8 Oct 2010, at 16:08, victor piousbox wrote: > I have a website with a bunch of articles. This is one of the queries > executed by I assume the Paginator: >

Re: Convert Text to Images to Protect your Email from Search

2010-10-10 Thread Jeremy Burns | Class Outfit
With respect, you've been 'new to CakePHP' for six months now (I checked back through the email history). Isn't it about time you stepped up to the plate a bit like we all have to? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 10 Oct 2

Re: Auth's login is not working at all, nor displaying errror

2010-10-10 Thread Jeremy Burns | Class Outfit
One small suggestion. Are you using 1.3? If so, refer to $this->Session rather than $session. At least you might get a message that could help track down the problem. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Oct 2010, at 01:18, Farhanx wr

Re: How to access Posted data

2010-10-11 Thread Jeremy Burns | Class Outfit
orial (http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application) which will help you through this. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Oct 2010, at 08:42, @gomesh wrote: > Hi everybody > > I have 2 models (User,Com

Re: Auth's login is not working at all, nor displaying errror

2010-10-11 Thread Jeremy Burns | Class Outfit
To be precise, it's echo $this->Session->flash('auth'); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Oct 2010, at 13:31, Marco wrote: > I think you need to write: echo $session->flash('auth'); > > On O

Re: .htaccess seems to give a problem

2010-10-11 Thread Jeremy Burns | Class Outfit
Things don't just go twang for no reason. What has changed? Have you upgraded your Cake version to 1.3.4? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 11 Oct 2010, at 22:25, Sjiep wrote: > Hello, > > Since a short while I seem to have pro

Re: CakePHP without CLI for the Bake console

2010-10-12 Thread Jeremy Burns | Class Outfit
I'd say always do the development locally and then upload. You won't need access to the command line remotely. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 10:19, Luis Miguel García wrote: > Hello, > > I'm in t

Re: Model plurality issue/choice

2010-10-12 Thread Jeremy Burns | Class Outfit
Yes. Model names are singular, and Cake pluralises them where necessary. And, if you were a purist, the primary key would be 'id'. http://book.cakephp.org/view/901/CakePHP-Conventions Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010

Re: Auth's login is not working at all, nor displaying errror

2010-10-12 Thread Jeremy Burns | Class Outfit
I *think* that in 1.3+ you have to use $this->Session, but I am willing to be corrected. If you are on 1.2-, it probably won't make a huge difference. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 13:20, Marco wrote: > @Jeremy &

Re: CakePHP 1.3.4 Stable - Weird problem with sessions! HELP!

2010-10-12 Thread Jeremy Burns | Class Outfit
Are you using https? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 14:04, 浪漫様 wrote: > In a normal world, the following code would work... you receive a > variable on your function, and you save it on a session, then the next > pag

Re: Please Help : I Can't get data of both associated models that are being $hasMany and $belongsTo model

2010-10-12 Thread Jeremy Burns | Class Outfit
ation back too: $authors = $this->Author->find( 'all', array( 'contain' => array( 'Book' => array( 'Publisher' ) )

Re: Please Help : I Can't get data of both associated models that are being $hasMany and $belongsTo model

2010-10-12 Thread Jeremy Burns | Class Outfit
on value (your first author) is pre-populated. You can also do: 'empty' => 'Please choose an author' Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 17:59, Ashwani Kumar wrote: > Hi jeremy! Thanx for the reply. I delet

Re: Please Help : I Can't get data of both associated models that are being $hasMany and $belongsTo model

2010-10-12 Thread Jeremy Burns | Class Outfit
Remove $this->Book->recursive = 1; That line is effectively stopping any searches pat the Book model. Did you follow my other tip about Containable? A tip; instead of doing pre etc... just do debug($authors); Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3

Re: schema info in bake?

2010-10-13 Thread Jeremy Burns | Class Outfit
if ($schema[$field]['type'] == 'datetime'): Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Oct 2010, at 11:09, euromark wrote: > does anyone know how to use schema infos in the baking templates? > to be precise, in the views >

Re: schema info in bake?

2010-10-13 Thread Jeremy Burns | Class Outfit
t the various variables in there. I'm sure there's more to learn. /cake/console/libs/tasks/ is where the variables are set. Have a look in view.php, for example. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Oct 2010, at 11:55, euromark wrote: >

Re: Framework benefit?

2010-10-13 Thread Jeremy Burns | Class Outfit
fact it's all probably an intellectual w*nk and a complete waste of time. My advice? Don't think about it too much, give it a go yourself and form your own opinion. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Oct 2010, at 20:33, WW wrote: > H

Re: Please Help : I Can't get data of both associated models that are being $hasMany and $belongsTo model

2010-10-13 Thread Jeremy Burns | Class Outfit
I'm blushing. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 13 Oct 2010, at 16:38, Ashwani Kumar wrote: > Thanx jeremy, so much, for all the help you did for me. Sorry, I didn't tried > Containable, that you asked me to do earlier, b

Re: How to use a controller for layout logic?

2010-10-14 Thread Jeremy Burns | Class Outfit
http://articles.classoutfit.com/2009/11/cakephp-dynamic-navigation-bars/ Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 14 Oct 2010, at 10:15, ravidp wrote: > Hi, > > In my layout I have a menu which I want a part of it to be filled > dynamica

Re: Is there an easy way to tell CakePHP to use another db setting instead of $default?

2010-10-15 Thread Jeremy Burns | Class Outfit
>From the 1.3 guide: http://book.cakephp.org/view/922/Database-Configuration Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Oct 2010, at 10:04, MissYeh wrote: > You can do that by setting the dbconfig in a specific model that needs > another db

Re: Is there an easy way to tell CakePHP to use another db setting instead of $default?

2010-10-15 Thread Jeremy Burns | Class Outfit
I have thought of doing something like before, but I can't help thinking that adding in a 'check which environment this is and change some settings' process is a tiny yet present overhead in the production instance. Maybe I'm just a coding skin flint ;-) Jeremy Burns Cl

Re: Another HABTM question

2010-10-15 Thread Jeremy Burns | Class Outfit
The join table has to be in alphabetical order, so try permissions_users. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Oct 2010, at 07:39, brybot wrote: > I've searched and looked through this group and the online > documentation for hou

Re: Newbie question - having trouble with baked model associations

2010-10-15 Thread Jeremy Burns | Class Outfit
See here: http://groups.google.com/group/cake-php/browse_thread/thread/7bfef9785d10d2d5 Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Oct 2010, at 13:52, deafpanda wrote: > Hello, > > Sorry if this question is really stupid, I'm new t

Re: Newbie question - having trouble with baked model associations

2010-10-15 Thread Jeremy Burns | Class Outfit
See here: http://groups.google.com/group/cake-php/browse_thread/thread/7bfef9785d10d2d5 Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3822 (m) +44 (0) 7973 481949 Skype: jeremy_burns http://www.classoutfit.com On 15 Oct 2010, at 13:52, deafpanda wrote: > He

Re: Database modelling

2010-10-16 Thread Jeremy Burns | Class Outfit
All users should belong to the same table and be differentiated by group_id, as you describe. You can then use prefix routing to manage permissions for each group: http://book.cakephp.org/view/950/Prefix-Routing Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com

Re: ACL and multiple groups

2010-10-17 Thread Jeremy Burns | Class Outfit
The permissions thing is a work in progress - eta 1 to 2 weeks. I haven't made a navigation plug in, but revisited it last week for a current project. When I've made the changes I need to I will create a plug in. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.class

Re: need help

2010-10-19 Thread Jeremy Burns | Class Outfit
http://book.cakephp.org/view/907/Developing-with-CakePHP Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Oct 2010, at 13:28, Sunil Chugh wrote: > steps to configure > Cake Console and Bake > > Check out the new CakePHP Questions site http:

Re: Easiest way to get data from a model (better way than $model->data['modelname']['field'])?

2010-10-19 Thread Jeremy Burns | Class Outfit
change the join type in your model and all of your finds and so on will still work. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Oct 2010, at 14:59, Joshua Muheim wrote: > Maybe I don't really understand your point, but as far as I see that'

Re: Easiest way to get data from a model (better way than $model->data['modelname']['field'])?

2010-10-19 Thread Jeremy Burns | Class Outfit
I hate to be contrary, but I disagree. Whatever else you come up with would be great for some, awkward for others. It works and I think it's very precise. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Oct 2010, at 16:34, Joshua Muheim wrote: >

Re: So methods that are not an action should have a "_" in front of it?

2010-10-19 Thread Jeremy Burns | Class Outfit
Are you rewriting Cake, PHP or just building your own stuff? ;-) Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Oct 2010, at 16:37, Joshua Muheim wrote: > Yeah I knew that, but still IMHO they should have been named with a "_" > pref

Re: How to use a controller for layout logic?

2010-10-20 Thread Jeremy Burns | Class Outfit
Use the Containable behaviour. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 20 Oct 2010, at 12:59, ravidp wrote: > Hi, > > I need to paginate data from table connected across 3 levels (a->b- >> c). > The thing is, recursive = 2

Re: $this->Author->set(...)/find(...) creates other $data array than the one a form creates (case of the keys)

2010-10-20 Thread Jeremy Burns | Class Outfit
Or you could just use a virtual field in the model? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 20 Oct 2010, at 14:48, psybear83 wrote: > Hi everybody > > I just stumbled over the following problem. > > I have a method concatName() i

Re: getting a blank page

2010-10-24 Thread Jeremy Burns | Class Outfit
Have you set debug to 2 in /app/config/core.php? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 24 Oct 2010, at 04:34, ravidp wrote: > by the way, > > if i run this query on phpmyadmin, it works fine returns about > 200,000 results. > >

Re: Build Query

2010-10-25 Thread Jeremy Burns | Class Outfit
Do you have a field named 'location' or is it 'name'? If it's name, you'd need to do findAllByName. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 25 Oct 2010, at 13:30, Briko03 wrote: > Any idea why this wouldn'

Re: Build Query

2010-10-25 Thread Jeremy Burns | Class Outfit
Are you certain you have a row in your database that matches that criteria? The SQL looks right, but the count is zero. What happens when you run the SQL directly against the database? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 25 Oct 2010, at 13:46

Re: Delete from model not working

2010-10-26 Thread Jeremy Burns | Class Outfit
Do you have referential integrity set up? If so, are there other records that are dependent upon this one? What happens if you try and delete the record directly in the database? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 26 Oct 2010, at 14:18, cricket

Re: Fake Model / Table

2010-10-26 Thread Jeremy Burns | Class Outfit
That's pretty much what I'd do. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 26 Oct 2010, at 16:10, Dave Maharaj wrote: > How do you make a fake table. I need a select input which has 5 options (0-5, > 5-10, 10-15, 15-20, 20+) as optio

Re: Acl and bindNode

2010-10-27 Thread Jeremy Burns | Class Outfit
I wish that were the case, but the guide then gives an example of the aros table, which only includes groups: http://book.cakephp.org/view/1547/Acts-As-a-Requester Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 27 Oct 2010, at 13:41, cricket wrote: >

Re: Deeper User Info

2010-10-28 Thread Jeremy Burns | Class Outfit
I've tried a few ways of doing that and the only success I had was adding extra keys to the Auth->user array after the user logs in, which means it'll be available thereafter. I'd be interested to know if there is a better way. Jeremy Burns Class Outfit jeremybu...@cl

Re: Strange Session problem

2010-10-29 Thread Jeremy Burns | Class Outfit
Are you switching between http and https at any time? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Oct 2010, at 05:52, Squire wrote: > Hi > > I've just encountered a really strange problem on one of our > production sites. Thi

Re: Acl and bindNode

2010-10-29 Thread Jeremy Burns | Class Outfit
Anybody else got any more ideas on this? Anyone using it with success? Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3822 (m) +44 (0) 7973 481949 Skype: jeremy_burns http://www.classoutfit.com On 27 Oct 2010, at 17:10, Jeremy Burns | Class Outfit wrote: > I w

Re: Sent mails don't arrive in Outlook Exchange mailboxes!

2010-10-29 Thread Jeremy Burns | Class Outfit
t them. It seems as if it is a problem outside of Cake/PHP and more likely an internal mail server issue. We are trying to track this one down at the moment and I will feedback anything we discover. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Oct 2010

Re: Acl and bindNode

2010-11-01 Thread Jeremy Burns | Class Outfit
Because the users table has a group_id on it. Duh. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 31 Oct 2010, at 14:48, huoxito wrote: > Guess I dont get your point. > > Users still must de added on Aro's table, otherwise how would your >

Re: Select Box Values

2010-11-02 Thread Jeremy Burns | Class Outfit
In your find('list') function you have specified the fields to use, and you have only given one field; 'location'. Try changing that to: array('id', 'location') so that you have two columns; id & location. Jeremy Burns Class Outfit jeremybu...@clas

Re: Acl and bindNode

2010-11-03 Thread Jeremy Burns | Class Outfit
I'm still really hoping that someone with some inside knowledge can shed a light on this for me. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 1 Nov 2010, at 07:24, Jeremy Burns | Class Outfit wrote: > Because the users table has a group_

Re: Does every model really need a "name" field? --psybear

2010-11-04 Thread Jeremy Burns | Class Outfit
Interesting question - what's your fear of model names? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Nov 2010, at 08:11, psybear83 wrote: > Hi everybody > > A collegue told me some time ago, that every CakePHP model needs a > &q

Re: Does every model really need a "name" field? --psybear

2010-11-04 Thread Jeremy Burns | Class Outfit
akephp.org/view/1014/Titles for more info. I prefer to stick to a name field as Cake drives convention. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 4 Nov 2010, at 08:18, Joshua Muheim wrote: >> Is this what you mean?? > > I guess not really.

Re: Ensuring uniqueness on application level

2010-11-05 Thread Jeremy Burns | Class Outfit
unique] key floating around twice - that is a nightmare waiting to happen. If you are using soft delete is suggests that someone can soft undelete - what happens if that produces a clash with another undeleted id? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com

Re: Has One vs belongsTo and a weird table association

2010-11-05 Thread Jeremy Burns | Class Outfit
$hasAndBelongsToMany User [owner]? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Nov 2010, at 08:25, Santiago Basulto wrote: > Hello people. > > I'm developing a Cake app and have a little problem. Let me tell you > how is it organized fi

Re: ACL and Auth: Check if logged in user has same ID as passed by the URL? --psybear

2010-11-05 Thread Jeremy Burns | Class Outfit
You can check against $this->Auth->User-id to make sure the user id of the profile they want to edit matches. That way you are not relying on parameters passed in via a url. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 5 Nov 2010, at 10:23, psy

Re: formhelper & unique id's for form elements?

2010-11-09 Thread Jeremy Burns | Class Outfit
Try: echo $this->Form->input(, array(, 'id' => 'whatever')); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 9 Nov 2010, at 09:49, johey wrote: > Hi all, > > More or less a php + cakephp newbie here, so

Re: Is there a reason why I shouln't make $this->Html available in views as $html? --psybear

2010-11-12 Thread Jeremy Burns | Class Outfit
tra work in the first place by just pre-pending the helper name in the first place. I don't see the big deal. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 12 Nov 2010, at 08:18, Joshua Muheim wrote: > I'd really like to know why it has switche

Re: Phantom URL

2010-11-15 Thread Jeremy Burns | Class Outfit
Is this the error you'd expect to see if the login fails validation? If so, is your code in the login action checking for the presence of data before processing it further? If not, the error will fire. Another suggestion is to clear the cache. Jeremy Burns Class Outfit jer

Re: Mail Distributor

2010-11-15 Thread Jeremy Burns | Class Outfit
Why not run this out of the User model? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Nov 2010, at 20:23, TimK wrote: > Hello Everybody! > > I like to write a mail distributor. It shall send an email to all > registered users with an

Re: Phantom URL

2010-11-15 Thread Jeremy Burns | Class Outfit
; in /password/error it goes to login yet password/error/script sits there with > the error message. > > From: Jeremy Burns | Class Outfit [mailto:jeremybu...@classoutfit.com] > Sent: November-15-10 4:55 PM > To: cake-php@googlegroups.com > Subject: Re: Phantom URL > > Is

Re: Phantom URL

2010-11-15 Thread Jeremy Burns | Class Outfit
So you haven't programmed your "Opps! Error message..." in anywhere? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 15 Nov 2010, at 21:34, Dave Maharaj wrote: > Not sure I follow what you are saying…sorry. > > No login attempt i

Re: PHPCake: trouble with Controllers

2010-11-17 Thread Jeremy Burns | Class Outfit
this: $result = $this->Profile->find(...); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 17 Nov 2010, at 10:20, bobaso wrote: > I'm having some troubles with PHP while working with Controllers. > If i want to create and then use 2 controll

Re: What are the links between relationships and containable?

2010-11-18 Thread Jeremy Burns | Class Outfit
Do you mean relationships in the database or in the models? They are essential in the models (else Cake won't know how to relate models) and although not a Cake requirement I'd say it is paramount from a performance point of view in the database. Jeremy Burns Class Outfit

Re: What are the links between relationships and containable?

2010-11-18 Thread Jeremy Burns | Class Outfit
=> array( 'ProfileDataType' ) ) ) ) ); Happy to be corrected, but I think recursion is redundant when using contain, so no need to set it to -1 (although I suppose it doesn't hurt). Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.clas

Re: Model data array: how to examine which model it comes from?

2010-11-18 Thread Jeremy Burns | Class Outfit
Interesting question: why do you need to know? The User key contains user data, the Address key contains address data, and the two are related...no? I think your example array is missing some elements as there would normally be a user_id key in the Address section...I think. Jeremy Burns Class

Re: What are the links between relationships and containable?

2010-11-18 Thread Jeremy Burns | Class Outfit
And don't forget it's $actsAs, not $actAs (cricket has identified this in his response). Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 18 Nov 2010, at 17:45, cricket wrote: > On Thu, Nov 18, 2010 at 11:03 AM, Dan wrote: >> When using

Re: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 207 bytes

2010-11-19 Thread Jeremy Burns | Class Outfit
Wow. That's a LOT of heavy lifting. Even if you increased ram, cpu and strapped on a booster rocket it's still a lot of data. Is this efficient - can you be more precise with your queries? I wonder what the user experience is like... Jeremy Burns Class Outfit jeremybu...@classoutfi

Re: Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 207 bytes

2010-11-19 Thread Jeremy Burns | Class Outfit
Sometimes the client (who is paying you to provide a solution) does not always know best. What he wants is the data moved somewhere, not an 'excel export feature'. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Nov 2010, at 14:03, Renato

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-22 Thread Jeremy Burns | Class Outfit
o the bone and gradually build back up until it breaks Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Nov 2010, at 19:20, qua...@gmail.com wrote: > Ran into another stop. > > Code: > $this->Album->id = $album_id; > $this->Album-&g

Re: Acl and bindNode

2010-11-22 Thread Jeremy Burns | Class Outfit
See the previous reply in this thread that arrived yesterday - haven't followed it through yet. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 21 Nov 2010, at 22:49, Rajat wrote: > i m also facing this issue. > did u get any official upda

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-22 Thread Jeremy Burns | Class Outfit
27;One Thing Leads to > Another'LIMIT 1 > > I specify an ID and field() the model for the data. It really can't > get simpler than that and yet it still produced wrong SQL. Cake is > trying to be too smart there? > > Thanks. > > On Nov 22, 11:36 am, Jeremy Burn

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-22 Thread Jeremy Burns | Class Outfit
And did you empty the cache, disable the cache, etc etc as suggested earlier? Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 22 Nov 2010, at 20:18, qua...@gmail.com wrote: > Here is all the code: > $this->out("this->Album->field(

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-22 Thread Jeremy Burns | Class Outfit
) but at a different place each time, I'd find it difficult to pin it down to code which at the end of the day is plain old hard logic and then ought to be repeatable. What else have you got either in your code or elsewhere in your environment that is variable? Jeremy Burns Class O

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-22 Thread Jeremy Burns | Class Outfit
h > it: > > Shell code (ImportMine is a task): > foreach ($mine_data as $mine) > { >.. > $this->ImportMine->import($name, $artist, $album, $genre, > $mine['Mine']['id']); > .. > } > > Thanks. > > On Nov 2

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-22 Thread Jeremy Burns | Class Outfit
Yup - I'd agree that perhaps memory is a good starting place. Can you achieve your desired result by breaking up your total data set into smaller chunks and iterate through them? This might avoid memory issues and the like. Jeremy Burns Class Outfit jeremybu...@classoutfit.com

Re: Problem with Cake PHP blog tutorial..Can't add

2010-11-23 Thread Jeremy Burns | Class Outfit
That's the error message PHP delivers when something is printed to screen before the actual output (the headers referred to in the error message). Check you code for debug statements or other errors that could be doing this. Jeremy Burns Class Outfit jeremybu...@classoutfit.com

Re: Optimize ACL database

2010-11-24 Thread Jeremy Burns | Class Outfit
This article has some general database tuning tips, and also includes specific advice on ACL. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 24 Nov 2010, at 14:34, parallel32 wrote: > Does anyone have any recommendations on how to best optimize the a

Re: Optimize ACL database

2010-11-25 Thread Jeremy Burns | Class Outfit
Thank you. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 25 Nov 2010, at 09:41, netusco wrote: > I guess you forgot to paste the direct link to your article: > > http://articles.classoutfit.com/2010/02/cakephp-basic-database-table-tuning-tips/com

Re: Optimize ACL database

2010-11-25 Thread Jeremy Burns | Class Outfit
http://articles.classoutfit.com/2010/02/cakephp-basic-database-table-tuning-tips/ Jeremy Burns Class Outfit jeremybu...@classoutfit.com (t) +44 (0) 208 123 3822 (m) +44 (0) 7973 481949 Skype: jeremy_burns http://www.classoutfit.com On 25 Nov 2010, at 12:16, parallel32 wrote: > Thanks for

Re: Question about admin panel : is there any security risk using this code?

2010-11-25 Thread Jeremy Burns | Class Outfit
I'll let others answer the security question, but thought you might like to know that you can do this: if ($this->params['prefix'] == 'admin'): ...to find out if the current request is an admin one. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://ww

Re: CakePHP Model uses the wrong fields in SQL statements!

2010-11-25 Thread Jeremy Burns | Class Outfit
Amusing. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 25 Nov 2010, at 19:44, AD7six wrote: > > > On Nov 25, 8:40 pm, John Steele wrote: >>>>> FWIW/For info I've (as I'm sure have many) run many batch processes >&g

Re: conversion of mysql query to cakephp query

2010-11-27 Thread Jeremy Burns | Class Outfit
Try: $this->User->saveField(array('User.balance'=>'User.balance-5'), array('User.id'=>1)); Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 27 Nov 2010, at 11:08, djogo wrote: > Miles, that would require SELECTi

Re: send email with attach

2010-11-29 Thread Jeremy Burns | Class Outfit
Read the manual: http://book.cakephp.org/view/1638/Attachments Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 29 Nov 2010, at 12:18, hoss7 wrote: > hi > i want send email with attach file in cakephp what i am must to do? > > Check out the

Re: CakePlate - Boilerplate CakePHP distro

2010-11-30 Thread Jeremy Burns | Class Outfit
Without downloading it, how do we find out what's included? How would anyone know if you've coded it well (to standards etc)? How easy is it to strip down pieces not needed on a specific project? What's the [Cake] upgrade path like? Jeremy Burns Class Outfit jeremybu...@class

Re: Using or not using PHP framework

2010-12-01 Thread Jeremy Burns | Class Outfit
I would thoroughly recommend/encourage/endorse making a contribution though. You'd normally pay for something this good, it'll be profitable for you and it will help keep it growing. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Dec 2010

Re: Auth set up

2010-12-02 Thread Jeremy Burns | Class Outfit
My bad. I was not returning 'true' from isAuthorized. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 2 Dec 2010, at 07:48, Jeremy Burns wrote: > I feel like I ought to know this, but am struggling . > > I am using the Auth component (

Re: Use CakePHP in NetBeans IDE 6.8

2010-12-02 Thread Jeremy Burns | Class Outfit
Sure - I'll drop everything and just knock you up a quick training course. NetBeans is just a glamourous text editor used for managing the text files that make up CakePHP. It should be fairly elementary for even a novice developer to work it out. Jeremy Burns Class Outfit jer

  1   2   3   4   5   6   7   8   9   10   >