Re: cakephp.org hacked?
Yeah its partially a halloween design. For everyone with their panties in a twist, it will be changed back soon. We can all resume being _serious_ about a framework with many food based puns. -Mark On Nov 2, 7:23 am, Adrenalin wrote: > I think that is funny, cakephp rockz ! ;) > > > > On Mon, Nov 2, 2009 at 10:14 AM, Shadab Shaikh wrote: > > Its look like horror film related website,probably due to celebration of > > Halloween, but the theme/graphics does not match with the purpose and > > concern of the website. Most weird graphics so far ! It should be changed > > asap ! > > > Shadab > > > On Mon, Nov 2, 2009 at 1:33 PM, tobi_one wrote: > > >> Sorry for that multithread. I did not see any related thread, when > >> posting. > > >> The "RIP" Cakephp graphics still feels weird to me, even though it > >> maybe halloween... But then, we don't celebrate Halloween over here! > > >> Cheers, > >> tobi_one > > >> On 1 Nov., 18:54, SERKAN TURAN wrote: > >> > *Halloween* :) > > >> > On Sun, Nov 1, 2009 at 7:44 PM, jacmoe wrote: > > >> > > Congratulations! :) > >> > > You just started the fifth thread on that subject. > >> > > No, the Cake devs put a lot of hard work into making us smile. > > >> > > On Nov 1, 6:42 pm, tobi_one wrote: > >> > > > What's wrong with the website? > > >> > > > Looks like it has been hacked or is this a "funny" Halloween joke? > > >> > > > Cheers, > >> > > > tobi_one > > >> > -- > >> > ST --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Tree reorder tweaking
One more note, MonkeyGirl, and I'm sure we're already on the same page, but the syntax should be $this->ModelName->reorder(); Using the categories example from http://book.cakephp.org/view/228/Basic-Usage , the syntax to reorder the entire tree by name is $this->Category- >reorder(); On Nov 2, 9:22 pm, Robert P wrote: > Also note that one issue with your reorderAll() function is that it > loops through all non-empty parent IDs. The only problem with this is > that top-level items WILL have an empty parent. > > On Nov 3, 10:27 am, Kerr wrote: > > > To be more specific in addressing, "I'm also still not > > sure ifreorder() recurses as far as it can, or just one level. " -- > > Yes, it will recurse thetreeuntil it finds no children in all > > affected branches. > > > On Nov 2, 8:25 pm, Kerr wrote: > > > > Hi, I've been playing around with thetreefunctionality as well. > > > Looking at the code, you'll notice that thereordermethod calls > > > itself recursively. If you want toreorderthe entiretree, simply > > > pass no arguments... e.g. > > > > $this->reorder(); > > > > Overall, I'm pretty impressed so far with how easy thetreemethods > > > make it to deal with the adjacency list hierarchy model. I've had to > > > code this kind of stuff from the ground up in SQL Server, and it was a > > > major PITA. > > > > On Oct 29, 5:27 am, MonkeyGirl wrote: > > > > > Hi. > > > > > I'm trying to order atreesuch that for any given node on thetree, > > > > all its children appear alphabetically, including the top level. > > > > > If I understand thereorder() method correctly (it has sparse > > > > documentation > > > > athttp://book.cakephp.org/view/229/Advanced-Usage#reorder-518 > > > > but the API > > > > athttp://api.cakephp.org/class/tree-behavior#method-TreeBehaviorreorder > > > > is more informative), then you need to pass it the IDs that need > > > > editing. I want toreorderthe whole entiretreethough, so I made my > > > > own reorderAll() method in /app/app_model.php: > > > > > function reorderAll($options = array()) { > > > > $parentIDs = $this->find('list', array( > > > > 'fields' => array( > > > > 'parent_id' > > > > ) > > > > )); > > > > > $parentIDs = array_unique($parentIDs); > > > > > foreach ($parentIDs as $parentID) { > > > > if (!empty($parentID)) { > > > > $options['id'] = $parentID; > > > > $this->reorder($options); > > > > } > > > > } > > > > } > > > > > Is this a good way of approaching it? The most obvious problem I can > > > > see at the moment is that the top level still isn't getting > > > > alphabetised, and I'm not sure how to do this. I'm also still not > > > > sure ifreorder() recurses as far as it can, or just one level. > > > > > Thanks for any help or suggestions! > > > > > Zoe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Weird Router Catchall Problem
On catch all page action check if URL is valid or at least not too wrong (like /style.css). If request isn't valid, display error page. On Nov 2, 10:46 am, TimG wrote: > I am using this: > Router::connect('(?!admin|items|images)(.*)', array > ('controller'=>'displays', 'action'=>'index')); > > Here is my problem: > If I go here "/books/view/9" it works fine. But... if there is an > error on the page like the style sheet isn't there. It tries to load > whatever was giving me the error and then goes to the catchall page. > > So if I go to "/books/view/9" but the file "style.css" is missing it > redirects to "/style.css" and loads the catchall page. > > Been messing with it for hours and I'm not sure what to do... an help > would be appreciated! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: single-field validation from controller
Option C does seem to be your best bet. I don't see anything wrong with something like this in AppModel: function validateSingle($field, $value = null) { $this->validate = array($field => $this->validate[$field]); $this->data[$this->alias][$field] = $value; return $this->validates(); } Then you can just return the error messages at your leisure. On Nov 2, 9:52 pm, pigeon wrote: > Hello everyone, > > let me quickly explain my situation and what i'm trying to achieve. > > I have a User model with 5 fields having validation rules, out of > these 5, 3 are required ( required => true, and they also have the > notEmpty rule ) > > I would like to pre-validate each field, one by one, from the > controller and give a JSON response. The reason for this, as you have > probably already guessed, is that i'm validating dynamically, as the > user fills in the form, before the actual submission. ( it's hooked to > onblur on the input fields ) > > It should look something like this: > - user changes away from the input field ( onblur ) > - javascript takes the name & value of the field, does POST to my > pre_validate action > - the pre_validate action validates this single field and outputs the > validation result in JSON > - the javascript updates the form with validation error messages if > required > > ( All this would be very handy ( and elegant ) when validating a field > for isUnique, for example. But it also provides a single point of > access to validation rules for scripts wanting to validate form data > pre-submission ) > > Removing "required" from any of my 3 mandatory fields is not an > option, since i don't want to end up with forged posts passing > validation without these fields. ( ie a user account with no > password.. nasty ) > > I have done some research here and on the web and found the following > possible solutions: > > a, i remove the required flag from my required fields and check for > them beforeSave. Nasty, breaks actual validation, not really what i'm > looking for. > > b, i do "->validates()" with only one field "->set()" on the model, > and filter the validation results. Running through all fields when i > expect to have only a single field's data does not seem to be an > elegant solution either. > > c, save the validation rules array for the single field i'm validating > for and re-build User->validate with this single field for the > validation-call. This seems to be the most promising way but i still > consider this hacking. > > Here comes the question - Is this implemented on the Model? Is there a > way i can execute validation rules for a single field ONLY? If it > isn't ( i believe it isn't ) how would you get around this? > > thanks & regards, > Andrew > > ps: i'm on 1.3 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Cache Help
Maybe I should have put in baby steps for you to follow. 1. Click edit 2.Save 3. Save redirects you back to index. 4.Look no new content 5.Click new or edit 6.Save 7.Back to index 8.No new content , add or edit new content and nothing shows up until you hit refresh...(the index is cached)i know on other sites on the web when you save or edit your content you don’t have to refresh the page to see your updatesmaybe the sites I go to are different than the ones you do but im sure if you thought about it you might see what I mean? 9.Hit refresh 10.WOW LOOK new content Yes $this->cacheAction = false; If you don’t have ananswer your can keep your snarky additude response's to your self "You have to hit refresh to reload a webpage... like everyone else?" Yes because that exactly what I was asking! -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Robert P Sent: November-02-09 11:30 PM To: CakePHP Subject: Re: Cache Help OK, this one confused me. You have to hit refresh to reload a webpage... like everyone else? And I've never seen $this->disableCache() before. Since 1.1 I've been using $this->cacheAction = false; On Nov 3, 8:48 am, "Dave" wrote: > I need some help figuring out caching. A lot of the site I am working > on is dynamic and I do not want to cache the constantly changing data / actions. > > I have added Cache to app_controller, even to individual controllers, > > added nocache blocks in the views, $this->disableCache(); in > controllers > > but everytime i make a change i have to hit refresh to get the new > data. not just on one page but every page > > Any tips, suggestion? > > Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Problem with saveAll() and beforeSave() - did not remember changes?
I think you must convert array structure before save call. saveAll function determine the way must be used for actual save before beforeSave is called. So saveAll thinks that it should save one record of one structure, but then you change it to many records of other structure. So save fails. Make your own mySave method, convert array there and then call saveAll. On Nov 2, 4:04 pm, red wrote: > Hi, > I've pasted code here:http://bin.cakephp.org/saved/52122 > > The problem is that the saveAll() doesn't work at all. Ok, it's > invoked and $this->data is modified, but saveAll() does not save any > records and debug($this->data) after success of saveAll() shows the > old structure of $this->data. What I'm doing wrong? > > Please help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Tree reorder tweaking
Also note that one issue with your reorderAll() function is that it loops through all non-empty parent IDs. The only problem with this is that top-level items WILL have an empty parent. On Nov 3, 10:27 am, Kerr wrote: > To be more specific in addressing, "I'm also still not > sure if reorder() recurses as far as it can, or just one level. " -- > Yes, it will recurse the tree until it finds no children in all > affected branches. > > On Nov 2, 8:25 pm, Kerr wrote: > > > Hi, I've been playing around with thetreefunctionality as well. > > Looking at the code, you'll notice that thereordermethod calls > > itself recursively. If you want toreorderthe entiretree, simply > > pass no arguments... e.g. > > > $this->reorder(); > > > Overall, I'm pretty impressed so far with how easy thetreemethods > > make it to deal with the adjacency list hierarchy model. I've had to > > code this kind of stuff from the ground up in SQL Server, and it was a > > major PITA. > > > On Oct 29, 5:27 am, MonkeyGirl wrote: > > > > Hi. > > > > I'm trying to order atreesuch that for any given node on thetree, > > > all its children appear alphabetically, including the top level. > > > > If I understand thereorder() method correctly (it has sparse > > > documentation > > > athttp://book.cakephp.org/view/229/Advanced-Usage#reorder-518 > > > but the API > > > athttp://api.cakephp.org/class/tree-behavior#method-TreeBehaviorreorder > > > is more informative), then you need to pass it the IDs that need > > > editing. I want toreorderthe whole entiretreethough, so I made my > > > own reorderAll() method in /app/app_model.php: > > > > function reorderAll($options = array()) { > > > $parentIDs = $this->find('list', array( > > > 'fields' => array( > > > 'parent_id' > > > ) > > > )); > > > > $parentIDs = array_unique($parentIDs); > > > > foreach ($parentIDs as $parentID) { > > > if (!empty($parentID)) { > > > $options['id'] = $parentID; > > > $this->reorder($options); > > > } > > > } > > > } > > > > Is this a good way of approaching it? The most obvious problem I can > > > see at the moment is that the top level still isn't getting > > > alphabetised, and I'm not sure how to do this. I'm also still not > > > sure ifreorder() recurses as far as it can, or just one level. > > > > Thanks for any help or suggestions! > > > > Zoe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Two Auth problems never found sloutions for it
He doesn't need to. Auth redirects only come into play on login, logout and when the user isn't authorised. Presumable Dave has allowed unauthorised access to RegistrationsController::pending_email_confirmation() On Nov 3, 6:47 am, Simon wrote: > did you set auth redirect to false ?? > > On Nov 2, 2:37 pm, "Dave" wrote: > > > For #2 in my login function I have > > > if ($this->Auth->user('confirmed') == '0') { > > $this->Session->destroy(); > > $this->redirect(array('controller' => 'registrations', > > 'action' => 'pending_email_confirmation')); > > } > > Dave > > > -Original Message- > > From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf > > Of Simon > > Sent: November-02-09 6:49 PM > > To: CakePHP > > Subject: Two Auth problems never found sloutions for it > > > 1. is save the last login without the auth redirect = to false 2. if the > > email is not verified redirect them > > > if you have any sloutions please share- Hide quoted text - > > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cache Help
OK, this one confused me. You have to hit refresh to reload a webpage... like everyone else? And I've never seen $this->disableCache() before. Since 1.1 I've been using $this->cacheAction = false; On Nov 3, 8:48 am, "Dave" wrote: > I need some help figuring out caching. A lot of the site I am working on is > dynamic and I do not want to cache the constantly changing data / actions. > > I have added Cache to app_controller, even to individual controllers, > > added nocache blocks in the views, $this->disableCache(); in controllers > > but everytime i make a change i have to hit refresh to get the new data. not > just on one page but every page > > Any tips, suggestion? > > Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Tree reorder tweaking
To be more specific in addressing, "I'm also still not sure if reorder() recurses as far as it can, or just one level. " -- Yes, it will recurse the tree until it finds no children in all affected branches. On Nov 2, 8:25 pm, Kerr wrote: > Hi, I've been playing around with thetreefunctionality as well. > Looking at the code, you'll notice that thereordermethod calls > itself recursively. If you want toreorderthe entiretree, simply > pass no arguments... e.g. > > $this->reorder(); > > Overall, I'm pretty impressed so far with how easy thetreemethods > make it to deal with the adjacency list hierarchy model. I've had to > code this kind of stuff from the ground up in SQL Server, and it was a > major PITA. > > On Oct 29, 5:27 am, MonkeyGirl wrote: > > > Hi. > > > I'm trying to order atreesuch that for any given node on thetree, > > all its children appear alphabetically, including the top level. > > > If I understand thereorder() method correctly (it has sparse > > documentation athttp://book.cakephp.org/view/229/Advanced-Usage#reorder-518 > > but the API > > athttp://api.cakephp.org/class/tree-behavior#method-TreeBehaviorreorder > > is more informative), then you need to pass it the IDs that need > > editing. I want toreorderthe whole entiretreethough, so I made my > > own reorderAll() method in /app/app_model.php: > > > function reorderAll($options = array()) { > > $parentIDs = $this->find('list', array( > > 'fields' => array( > > 'parent_id' > > ) > > )); > > > $parentIDs = array_unique($parentIDs); > > > foreach ($parentIDs as $parentID) { > > if (!empty($parentID)) { > > $options['id'] = $parentID; > > $this->reorder($options); > > } > > } > > } > > > Is this a good way of approaching it? The most obvious problem I can > > see at the moment is that the top level still isn't getting > > alphabetised, and I'm not sure how to do this. I'm also still not > > sure ifreorder() recurses as far as it can, or just one level. > > > Thanks for any help or suggestions! > > > Zoe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Tree reorder tweaking
Hi, I've been playing around with the tree functionality as well. Looking at the code, you'll notice that the reorder method calls itself recursively. If you want to reorder the entire tree, simply pass no arguments... e.g. $this->reorder(); Overall, I'm pretty impressed so far with how easy the tree methods make it to deal with the adjacency list hierarchy model. I've had to code this kind of stuff from the ground up in SQL Server, and it was a major PITA. On Oct 29, 5:27 am, MonkeyGirl wrote: > Hi. > > I'm trying to order atreesuch that for any given node on thetree, > all its children appear alphabetically, including the top level. > > If I understand thereorder() method correctly (it has sparse > documentation athttp://book.cakephp.org/view/229/Advanced-Usage#reorder-518 > but the API > athttp://api.cakephp.org/class/tree-behavior#method-TreeBehaviorreorder > is more informative), then you need to pass it the IDs that need > editing. I want toreorderthe whole entiretreethough, so I made my > own reorderAll() method in /app/app_model.php: > > function reorderAll($options = array()) { > $parentIDs = $this->find('list', array( > 'fields' => array( > 'parent_id' > ) > )); > > $parentIDs = array_unique($parentIDs); > > foreach ($parentIDs as $parentID) { > if (!empty($parentID)) { > $options['id'] = $parentID; > $this->reorder($options); > } > } > } > > Is this a good way of approaching it? The most obvious problem I can > see at the moment is that the top level still isn't getting > alphabetised, and I'm not sure how to do this. I'm also still not > sure ifreorder() recurses as far as it can, or just one level. > > Thanks for any help or suggestions! > > Zoe. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Cache Help
I need some help figuring out caching. A lot of the site I am working on is dynamic and I do not want to cache the constantly changing data / actions. I have added Cache to app_controller, even to individual controllers, added nocache blocks in the views, $this->disableCache(); in controllers but everytime i make a change i have to hit refresh to get the new data. not just on one page but every page Any tips, suggestion? Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Cake Hosting - Who is the best?
I use https://www.nearlyfreespeech.net/ over 2 years and am more then contented. Excellent scalable hosting service. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
try to set login system at home
I'm trying to set login functionality at home.ctp I have problem with error "Notice (8): Use of undefined constant - assumed ' ' [APP/views/layouts/default.php, line 49]" which from this code"create('User', array('action' => 'login')); ?>" also after click "login" botton goes to user/login page. I have created this function at users_controller.php but according to this ex) http://book.cakephp.org/view/172/Authentication I don't need to put anything since auth component takes care of it so I'm getting error message that view file is missing. How can I keep user stay home.ctp page if they fail to log in also what is the problem of error message? I have table called "Users" and login is email and pass at my app_controller.php class AppController extends Controller { var $components = array('Auth'); function beforeFilter() { Security::setHash("md5"); $this->Auth->fields = array('username' => 'email', 'password' => 'pass'); $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); $this->Auth->loginRedirect = array('controller' => 'pages', 'action' => 'home'); $this->Auth->logoutRedirect = array('controller' => 'users', 'action' => 'login');//'/'; $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; $this->Auth->authorize = 'controller'; } } my pages_controller.php class PagesController extends AppController { var $name = 'Pages'; var $helpers = array('Html', 'Form', 'Javascript'); var $uses = array('User'); function beforeFilter() { $this->Auth->allow('display'); parent::beforeFilter(); } function display() { $path = func_get_args(); $count = count($path); if (!$count) { $this->redirect('/'); } $page = $subpage = $title = null; if (!empty($path[0])) { $page = $path[0]; } if (!empty($path[1])) { $subpage = $path[1]; } if (!empty($path[$count - 1])) { $title = Inflector::humanize($path[$count - 1]); } $this->set(compact('page', 'subpage', 'title')); $this->render(join('/', $path)); } } home.ctp check('Message.auth')) $session->flash('auth'); ?> create('User', array('action' => 'login')); ?> 会員ログイン login: input('User.email', array( 'maxlength'=>100, 'label' => false, 'div'=>false))?> password: input('User.pass', array( 'type'=>'password', 'maxlength'=>20, 'label' => false, 'div'=>false))?> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Help doing this in CakePHP
Any idea how to use this approach with pagination? Chad On Mon, Nov 2, 2009 at 7:11 PM, Pablo Viojo wrote: > You can do something using subqueries (but if you're quering the same table > on main and sub query, it will not perform well) > I recommend to do two queries instead. > Regards, > > Pablo Viojo > pvi...@gmail.com > http://pviojo.net > > ¿Que necesitas? > http://needish.com > > > On Mon, Nov 2, 2009 at 8:49 PM, Chad Casselman wrote: >> >> Is there anyway to get all the row information with all those ids or >> does it require another query to get row details for returned ids? >> >> Thanks, >> Chad >> >> On Mon, Nov 2, 2009 at 6:36 PM, Pablo Viojo wrote: >> > Something like this may help: >> > SELECT domain_id, search_engine_id, MAX(id) FROM table GROUP >> > BY domain_id, >> > search_engine_id >> > Regards, >> > >> > Pablo Viojo >> > pvi...@gmail.com >> > http://pviojo.net >> > >> > ¿Que necesitas? >> > http://needish.com >> > >> > >> > On Mon, Nov 2, 2009 at 8:29 PM, Chad Casselman >> > wrote: >> >> >> >> I have a table that looks like: >> >> >> >> id created modified domain_id pages >> >> search_engine_id >> >> 92 2009-11-02 14:32:11 2009-11-02 14:32:11 2 19990 >> >> 3 >> >> 90 2009-11-02 14:32:11 2009-11-02 14:32:11 2 725 >> >> 1 >> >> 89 2009-11-02 14:32:10 2009-11-02 14:32:10 1 1250 >> >> 1 >> >> 88 2009-11-02 10:00:07 2009-11-02 10:00:07 2 19995 >> >> 3 >> >> 87 2009-11-02 10:00:07 2009-11-02 10:00:07 1 9612 >> >> 3 >> >> 86 2009-11-02 10:00:07 2009-11-02 10:00:07 2 725 >> >> 1 >> >> 85 2009-11-02 10:00:07 2009-11-02 10:00:07 1 1250 >> >> 1 >> >> 84 2009-11-02 09:59:47 2009-11-02 09:59:47 2 19995 >> >> 3 >> >> 83 2009-11-02 09:59:47 2009-11-02 09:59:47 1 9609 >> >> 3 >> >> 82 2009-11-02 09:59:47 2009-11-02 09:59:47 2 725 >> >> 1 >> >> 81 2009-11-02 09:59:47 2009-11-02 09:59:47 1 1250 >> >> 1 >> >> 80 2009-11-02 09:59:39 2009-11-02 09:59:39 2 19995 >> >> 3 >> >> 79 2009-11-02 09:59:39 2009-11-02 09:59:39 1 9609 >> >> 3 >> >> 78 2009-11-02 09:59:39 2009-11-02 09:59:39 2 725 >> >> 1 >> >> 77 2009-11-02 09:59:39 2009-11-02 09:59:39 1 1250 >> >> 1 >> >> >> >> I have spent over half the day trying to figure out how to pull the >> >> last inserted row for each domain_id, search_engine_id pair in >> >> CakePHP. >> >> >> >> Can anyone help me figure out how to do this within CakePHP? >> >> >> >> I really appreciate your time. >> >> Chad >> >> >> >> >> > >> > >> > > >> > >> >> > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Help doing this in CakePHP
You can do something using subqueries (but if you're quering the same table on main and sub query, it will not perform well) I recommend to do two queries instead. Regards, Pablo Viojo pvi...@gmail.com http://pviojo.net ¿Que necesitas? http://needish.com On Mon, Nov 2, 2009 at 8:49 PM, Chad Casselman wrote: > > Is there anyway to get all the row information with all those ids or > does it require another query to get row details for returned ids? > > Thanks, > Chad > > On Mon, Nov 2, 2009 at 6:36 PM, Pablo Viojo wrote: > > Something like this may help: > > SELECT domain_id, search_engine_id, MAX(id) FROM table GROUP > BY domain_id, > > search_engine_id > > Regards, > > > > Pablo Viojo > > pvi...@gmail.com > > http://pviojo.net > > > > ¿Que necesitas? > > http://needish.com > > > > > > On Mon, Nov 2, 2009 at 8:29 PM, Chad Casselman > wrote: > >> > >> I have a table that looks like: > >> > >> id created modifieddomain_id pages > >> search_engine_id > >> 92 2009-11-02 14:32:11 2009-11-02 14:32:11 2 19990 > 3 > >> 90 2009-11-02 14:32:11 2009-11-02 14:32:11 2 725 > 1 > >> 89 2009-11-02 14:32:10 2009-11-02 14:32:10 1 1250 > 1 > >> 88 2009-11-02 10:00:07 2009-11-02 10:00:07 2 19995 > 3 > >> 87 2009-11-02 10:00:07 2009-11-02 10:00:07 1 9612 > 3 > >> 86 2009-11-02 10:00:07 2009-11-02 10:00:07 2 725 > 1 > >> 85 2009-11-02 10:00:07 2009-11-02 10:00:07 1 1250 > 1 > >> 84 2009-11-02 09:59:47 2009-11-02 09:59:47 2 19995 > 3 > >> 83 2009-11-02 09:59:47 2009-11-02 09:59:47 1 9609 > 3 > >> 82 2009-11-02 09:59:47 2009-11-02 09:59:47 2 725 > 1 > >> 81 2009-11-02 09:59:47 2009-11-02 09:59:47 1 1250 > 1 > >> 80 2009-11-02 09:59:39 2009-11-02 09:59:39 2 19995 > 3 > >> 79 2009-11-02 09:59:39 2009-11-02 09:59:39 1 9609 > 3 > >> 78 2009-11-02 09:59:39 2009-11-02 09:59:39 2 725 > 1 > >> 77 2009-11-02 09:59:39 2009-11-02 09:59:39 1 1250 > 1 > >> > >> I have spent over half the day trying to figure out how to pull the > >> last inserted row for each domain_id, search_engine_id pair in > >> CakePHP. > >> > >> Can anyone help me figure out how to do this within CakePHP? > >> > >> I really appreciate your time. > >> Chad > >> > >> > > > > > > > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Edits being Added for form with associated model
Just fixed it. I was passing the $id to the action, but I hadn't added the hidden id fields to the form, so that each element knew what to update. So the two things I had to add were: - hidden id field for the Album - hidden id field for each track that was already part of the Album (i.e. in my foreach) This also allows you to add new tracks to existing albums without it creating a new album. I can give some more details if needed. On Oct 11, 7:26 pm, ajoberstar wrote: > So I've got aformthat's got fields for both themodel(Album) and > its associated (hasMany)model(Track). Anytime I use theeditform > it does anadd. I'm assuming this is an issue with how my data is > being passed to saveAll() but I can't figure it out (I'm pretty new to > CakePHP). > > Here's what myeditaction looks like in the AlbumsController. > > --- > - > > functionedit($id = null) > { > $this->Album->id = $id; > > if (empty($this->data)) > $this->data = $this->Album->read(); > else if ($this->Album->saveAll($this->data, array('validate' => > 'first'))) > $this->redirect(array('action' => 'index')); > else > $this->redirect($this-referer()); > > } > > --- > - > > Any help would be much appreciated. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Help doing this in CakePHP
Is there anyway to get all the row information with all those ids or does it require another query to get row details for returned ids? Thanks, Chad On Mon, Nov 2, 2009 at 6:36 PM, Pablo Viojo wrote: > Something like this may help: > SELECT domain_id, search_engine_id, MAX(id) FROM table GROUP BY domain_id, > search_engine_id > Regards, > > Pablo Viojo > pvi...@gmail.com > http://pviojo.net > > ¿Que necesitas? > http://needish.com > > > On Mon, Nov 2, 2009 at 8:29 PM, Chad Casselman wrote: >> >> I have a table that looks like: >> >> id created modified domain_id pages >> search_engine_id >> 92 2009-11-02 14:32:11 2009-11-02 14:32:11 2 19990 3 >> 90 2009-11-02 14:32:11 2009-11-02 14:32:11 2 725 1 >> 89 2009-11-02 14:32:10 2009-11-02 14:32:10 1 1250 1 >> 88 2009-11-02 10:00:07 2009-11-02 10:00:07 2 19995 3 >> 87 2009-11-02 10:00:07 2009-11-02 10:00:07 1 9612 3 >> 86 2009-11-02 10:00:07 2009-11-02 10:00:07 2 725 1 >> 85 2009-11-02 10:00:07 2009-11-02 10:00:07 1 1250 1 >> 84 2009-11-02 09:59:47 2009-11-02 09:59:47 2 19995 3 >> 83 2009-11-02 09:59:47 2009-11-02 09:59:47 1 9609 3 >> 82 2009-11-02 09:59:47 2009-11-02 09:59:47 2 725 1 >> 81 2009-11-02 09:59:47 2009-11-02 09:59:47 1 1250 1 >> 80 2009-11-02 09:59:39 2009-11-02 09:59:39 2 19995 3 >> 79 2009-11-02 09:59:39 2009-11-02 09:59:39 1 9609 3 >> 78 2009-11-02 09:59:39 2009-11-02 09:59:39 2 725 1 >> 77 2009-11-02 09:59:39 2009-11-02 09:59:39 1 1250 1 >> >> I have spent over half the day trying to figure out how to pull the >> last inserted row for each domain_id, search_engine_id pair in >> CakePHP. >> >> Can anyone help me figure out how to do this within CakePHP? >> >> I really appreciate your time. >> Chad >> >> > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Help doing this in CakePHP
Something like this may help: SELECT domain_id, search_engine_id, MAX(id) FROM table GROUP BY domain_id, search_engine_id Regards, Pablo Viojo pvi...@gmail.com http://pviojo.net ¿Que necesitas? http://needish.com On Mon, Nov 2, 2009 at 8:29 PM, Chad Casselman wrote: > > I have a table that looks like: > > id created modifieddomain_id pages > search_engine_id > 92 2009-11-02 14:32:11 2009-11-02 14:32:11 2 19990 3 > 90 2009-11-02 14:32:11 2009-11-02 14:32:11 2 725 1 > 89 2009-11-02 14:32:10 2009-11-02 14:32:10 1 12501 > 88 2009-11-02 10:00:07 2009-11-02 10:00:07 2 19995 3 > 87 2009-11-02 10:00:07 2009-11-02 10:00:07 1 96123 > 86 2009-11-02 10:00:07 2009-11-02 10:00:07 2 725 1 > 85 2009-11-02 10:00:07 2009-11-02 10:00:07 1 12501 > 84 2009-11-02 09:59:47 2009-11-02 09:59:47 2 19995 3 > 83 2009-11-02 09:59:47 2009-11-02 09:59:47 1 96093 > 82 2009-11-02 09:59:47 2009-11-02 09:59:47 2 725 1 > 81 2009-11-02 09:59:47 2009-11-02 09:59:47 1 12501 > 80 2009-11-02 09:59:39 2009-11-02 09:59:39 2 19995 3 > 79 2009-11-02 09:59:39 2009-11-02 09:59:39 1 96093 > 78 2009-11-02 09:59:39 2009-11-02 09:59:39 2 725 1 > 77 2009-11-02 09:59:39 2009-11-02 09:59:39 1 12501 > > I have spent over half the day trying to figure out how to pull the > last inserted row for each domain_id, search_engine_id pair in > CakePHP. > > Can anyone help me figure out how to do this within CakePHP? > > I really appreciate your time. > Chad > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to prevent Cross Site Foreign Script Attacks on your actions.
Well in most cases then not, if your on, says a users profile, you would submit to that page. Within that page you would check if a $_POST exists and then perform the add friend logic. On Nov 2, 8:44 am, Jonas Hartmann wrote: > Given someone mails you a link with html images that tries to > fetchhttp://domain.tld/users/add_friend/5 > - now the user is logged into a web client that fetches that URL. > > How do you protect your cake application to not modify data. HTML wise > this should be a PUT or POST method not a GET method, but how do I > tell cakephp to ignore GET requests? > How do I furthermore setup the link in my application's view ($html- > >link()) to use PUT or POST instead of GET? Will this be possible > without a ? > > Any tips? > > King regards > ionas82 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Help doing this in CakePHP
I have a table that looks like: id created modifieddomain_id pages search_engine_id 92 2009-11-02 14:32:11 2009-11-02 14:32:11 2 19990 3 90 2009-11-02 14:32:11 2009-11-02 14:32:11 2 725 1 89 2009-11-02 14:32:10 2009-11-02 14:32:10 1 12501 88 2009-11-02 10:00:07 2009-11-02 10:00:07 2 19995 3 87 2009-11-02 10:00:07 2009-11-02 10:00:07 1 96123 86 2009-11-02 10:00:07 2009-11-02 10:00:07 2 725 1 85 2009-11-02 10:00:07 2009-11-02 10:00:07 1 12501 84 2009-11-02 09:59:47 2009-11-02 09:59:47 2 19995 3 83 2009-11-02 09:59:47 2009-11-02 09:59:47 1 96093 82 2009-11-02 09:59:47 2009-11-02 09:59:47 2 725 1 81 2009-11-02 09:59:47 2009-11-02 09:59:47 1 12501 80 2009-11-02 09:59:39 2009-11-02 09:59:39 2 19995 3 79 2009-11-02 09:59:39 2009-11-02 09:59:39 1 96093 78 2009-11-02 09:59:39 2009-11-02 09:59:39 2 725 1 77 2009-11-02 09:59:39 2009-11-02 09:59:39 1 12501 I have spent over half the day trying to figure out how to pull the last inserted row for each domain_id, search_engine_id pair in CakePHP. Can anyone help me figure out how to do this within CakePHP? I really appreciate your time. Chad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Two Auth problems never found sloutions for it
did you set auth redirect to false ?? On Nov 2, 2:37 pm, "Dave" wrote: > For #2 in my login function I have > > if ($this->Auth->user('confirmed') == '0') { > $this->Session->destroy(); > $this->redirect(array('controller' => 'registrations', > 'action' => 'pending_email_confirmation')); > } > Dave > > > > -Original Message- > From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf > Of Simon > Sent: November-02-09 6:49 PM > To: CakePHP > Subject: Two Auth problems never found sloutions for it > > 1. is save the last login without the auth redirect = to false 2. if the > email is not verified redirect them > > if you have any sloutions please share- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Two Auth problems never found sloutions for it
For #2 in my login function I have if ($this->Auth->user('confirmed') == '0') { $this->Session->destroy(); $this->redirect(array('controller' => 'registrations', 'action' => 'pending_email_confirmation')); } Dave -Original Message- From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf Of Simon Sent: November-02-09 6:49 PM To: CakePHP Subject: Two Auth problems never found sloutions for it 1. is save the last login without the auth redirect = to false 2. if the email is not verified redirect them if you have any sloutions please share --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Two Auth problems never found sloutions for it
1. is save the last login without the auth redirect = to false 2. if the email is not verified redirect them if you have any sloutions please share --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WSOD on large number of elements in a form
I also set the upload_max_filesize and post_max_size to 128M and the available memory size to 256M Probably not going to make the shared host happy, but phpinfo is reporting these values as having been set. It's a mystery. I am going to try and replicate the problem on a clean install to try and track it down. On Nov 2, 7:52 pm, Dragos Chiriac wrote: > http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody > upload_max_filesize and post_max_size in your php.ini file. > Each name/value is limited to 1024 characters, if the form type is not > multipart. > Also look at memory size available for script ... the default 16M is not > enough, as cake itself uses about 6-9 of them for a not very complex > app. Notice that on certain distros the ini files for cli and apache > module are different, and that you need to restart apache after every > change. I suppose you use apache. > Also notice that certain browsers (cough, ie, cough) , in my experience, > have a hard time and break your post data if using many inputs and not > setting a multipart form. > > Considering WSOD, is probably to have with your server (apache) > settings. Can you try to post the form to a simple php that's print_r($_POST) ?>ing the form data ?, with reporting E_ALL ? > > #tail -f the error.log file of the server to see realtime what's the > server saying about your attempt. > > Dragos > > Tonu Tusk wrote: > > Hi, This is going to sounds a bit vague to start with, but I basically > > have a form that has a lot of input boxes in it > > ( > 500 text input boxes) and when this is posting back to the > > controller I get the WSOD. > > > I have turned off all of my actual processing code in my controller > > and it did all work with a smaller number of input boxes, but now it > > just white screens. > > > As I mentioned, rewriting the controller code to just not even touch > > the POSTed data but just to show some indication of status does not > > affect things, there should be no (or next to no) processing of this > > going on, but the controller definitely still works with exactly the > > same code generating the forms, just a fewer number of inputs in the > > form. > > > I have altered my php settings from 8M post memory to 128M as well as > > massively upping the memory allowed for > > php scripts but still white screen. > > > I don't know where to start I have tried chainging index.php in the > > main entry call between generting the form and > > posting it anywhere but again, I am just getting a whitescreen. > > > Any help at all to point me where to look next would be welcome. If I > > can't debug cake then it will be a good couple of months work down the > > pan and I'll have to choose another option for framework etc as I > > can't waste any more time on bumbling around blindly. > > > thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WSOD on large number of elements in a form
oh yes, as I mentioned, I have also set a simple php script that is outside of the cake "jursadiction" and rewrite / routing mechanism but still hosted on the same shared host to just vardump the POSTed data, and that works absolutely fine. On Nov 2, 8:09 pm, Tonu Tusk wrote: > Hi OK, well it is on a shared host so don't know how much luck I can > get on accessing their logs. > > I have debug on level 2. > > I have stripped my controller back now so that it unconditionally just > prepares the data to pass to the view to display the form. > Everything is ok with that. > > I have written a new controller with no DB ($uses setup with an empty > array) I have put its beforeFilter to allow all actions via Acl > and have a simple action setup to act as the post target for my big > form. > > but even with all this on (php error reporting also confirmed as being > on) it is just a white screen still. > > The same helper and code is grabbing data for a different circumstance > that generates a smaller number of input fields > and that posts to the new controller fine. > > It just doesn't seem to be getting through anywhere. > > On Nov 2, 7:09 pm, Pedro Nascimento wrote: > > > Also, check apache logs. There may be some valuable info there. > > > On Mon, Nov 2, 2009 at 17:04, John Andersen wrote: > > > > If you haven't, turn on debug and tell us the debug information that > > > you can see, look also at the source! > > > > Please provide the code for the Controller action in which the failure > > > occur, so that we may be able to assist you better! > > > Enjoy, > > > John > > > > On Nov 2, 6:22 pm, Tonu Tusk wrote: > > > > Hi, This is going to sounds a bit vague to start with, but I basically > > > > have a form that has a lot of input boxes in it > > > > ( > 500 text input boxes) and when this is posting back to the > > > > controller I get the WSOD. > > > > > I have turned off all of my actual processing code in my controller > > > > and it did all work with a smaller number of input boxes, but now it > > > > just white screens. > > > > > As I mentioned, rewriting the controller code to just not even touch > > > > the POSTed data but just to show some indication of status does not > > > > affect things, there should be no (or next to no) processing of this > > > > going on, but the controller definitely still works with exactly the > > > > same code generating the forms, just a fewer number of inputs in the > > > > form. > > > > > I have altered my php settings from 8M post memory to 128M as well as > > > > massively upping the memory allowed for > > > > php scripts but still white screen. > > > > > I don't know where to start I have tried chainging index.php in the > > > > main entry call between generting the form and > > > > posting it anywhere but again, I am just getting a whitescreen. > > > > > Any help at all to point me where to look next would be welcome. If I > > > > can't debug cake then it will be a good couple of months work down the > > > > pan and I'll have to choose another option for framework etc as I > > > > can't waste any more time on bumbling around blindly. > > > > > thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WSOD on large number of elements in a form
Hi OK, well it is on a shared host so don't know how much luck I can get on accessing their logs. I have debug on level 2. I have stripped my controller back now so that it unconditionally just prepares the data to pass to the view to display the form. Everything is ok with that. I have written a new controller with no DB ($uses setup with an empty array) I have put its beforeFilter to allow all actions via Acl and have a simple action setup to act as the post target for my big form. but even with all this on (php error reporting also confirmed as being on) it is just a white screen still. The same helper and code is grabbing data for a different circumstance that generates a smaller number of input fields and that posts to the new controller fine. It just doesn't seem to be getting through anywhere. On Nov 2, 7:09 pm, Pedro Nascimento wrote: > Also, check apache logs. There may be some valuable info there. > > On Mon, Nov 2, 2009 at 17:04, John Andersen wrote: > > > If you haven't, turn on debug and tell us the debug information that > > you can see, look also at the source! > > > Please provide the code for the Controller action in which the failure > > occur, so that we may be able to assist you better! > > Enjoy, > > John > > > On Nov 2, 6:22 pm, Tonu Tusk wrote: > > > Hi, This is going to sounds a bit vague to start with, but I basically > > > have a form that has a lot of input boxes in it > > > ( > 500 text input boxes) and when this is posting back to the > > > controller I get the WSOD. > > > > I have turned off all of my actual processing code in my controller > > > and it did all work with a smaller number of input boxes, but now it > > > just white screens. > > > > As I mentioned, rewriting the controller code to just not even touch > > > the POSTed data but just to show some indication of status does not > > > affect things, there should be no (or next to no) processing of this > > > going on, but the controller definitely still works with exactly the > > > same code generating the forms, just a fewer number of inputs in the > > > form. > > > > I have altered my php settings from 8M post memory to 128M as well as > > > massively upping the memory allowed for > > > php scripts but still white screen. > > > > I don't know where to start I have tried chainging index.php in the > > > main entry call between generting the form and > > > posting it anywhere but again, I am just getting a whitescreen. > > > > Any help at all to point me where to look next would be welcome. If I > > > can't debug cake then it will be a good couple of months work down the > > > pan and I'll have to choose another option for framework etc as I > > > can't waste any more time on bumbling around blindly. > > > > thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WSOD on large number of elements in a form
http://httpd.apache.org/docs/2.0/mod/core.html#limitrequestbody upload_max_filesize and post_max_size in your php.ini file. Each name/value is limited to 1024 characters, if the form type is not multipart. Also look at memory size available for script ... the default 16M is not enough, as cake itself uses about 6-9 of them for a not very complex app. Notice that on certain distros the ini files for cli and apache module are different, and that you need to restart apache after every change. I suppose you use apache. Also notice that certain browsers (cough, ie, cough) , in my experience, have a hard time and break your post data if using many inputs and not setting a multipart form. Considering WSOD, is probably to have with your server (apache) settings. Can you try to post the form to a simple php that's ing the form data ?, with reporting E_ALL ? #tail -f the error.log file of the server to see realtime what's the server saying about your attempt. Dragos Tonu Tusk wrote: > Hi, This is going to sounds a bit vague to start with, but I basically > have a form that has a lot of input boxes in it > ( > 500 text input boxes) and when this is posting back to the > controller I get the WSOD. > > I have turned off all of my actual processing code in my controller > and it did all work with a smaller number of input boxes, but now it > just white screens. > > As I mentioned, rewriting the controller code to just not even touch > the POSTed data but just to show some indication of status does not > affect things, there should be no (or next to no) processing of this > going on, but the controller definitely still works with exactly the > same code generating the forms, just a fewer number of inputs in the > form. > > I have altered my php settings from 8M post memory to 128M as well as > massively upping the memory allowed for > php scripts but still white screen. > > I don't know where to start I have tried chainging index.php in the > main entry call between generting the form and > posting it anywhere but again, I am just getting a whitescreen. > > Any help at all to point me where to look next would be welcome. If I > can't debug cake then it will be a good couple of months work down the > pan and I'll have to choose another option for framework etc as I > can't waste any more time on bumbling around blindly. > > thanks in advance > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to search inside http://code.cakephp.org/tickets ?
It's not just you, I am also missing this feature. I hope this is coming soon. Jaime schrieb: > Hi all, > > Am I crazy, or it is impossible to search inside the new ticket system > at http://code.cakephp.org/tickets? Wanted to report an issue, but I'm > unable to filter the ticket list to check whether it has been already > reported or not. > > Of course it's possible to google "site:http://code.cakephp.org/ > tickets keywords here", but this doesn't filter the issue list to > narrow it down to open tickets or other search criteria. This is a > pretty basic feature in every issue tracking system, so I'm sure I'm > just missing something important here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WSOD on large number of elements in a form
Also, check apache logs. There may be some valuable info there. On Mon, Nov 2, 2009 at 17:04, John Andersen wrote: > > If you haven't, turn on debug and tell us the debug information that > you can see, look also at the source! > > Please provide the code for the Controller action in which the failure > occur, so that we may be able to assist you better! > Enjoy, >John > > On Nov 2, 6:22 pm, Tonu Tusk wrote: > > Hi, This is going to sounds a bit vague to start with, but I basically > > have a form that has a lot of input boxes in it > > ( > 500 text input boxes) and when this is posting back to the > > controller I get the WSOD. > > > > I have turned off all of my actual processing code in my controller > > and it did all work with a smaller number of input boxes, but now it > > just white screens. > > > > As I mentioned, rewriting the controller code to just not even touch > > the POSTed data but just to show some indication of status does not > > affect things, there should be no (or next to no) processing of this > > going on, but the controller definitely still works with exactly the > > same code generating the forms, just a fewer number of inputs in the > > form. > > > > I have altered my php settings from 8M post memory to 128M as well as > > massively upping the memory allowed for > > php scripts but still white screen. > > > > I don't know where to start I have tried chainging index.php in the > > main entry call between generting the form and > > posting it anywhere but again, I am just getting a whitescreen. > > > > Any help at all to point me where to look next would be welcome. If I > > can't debug cake then it will be a good couple of months work down the > > pan and I'll have to choose another option for framework etc as I > > can't waste any more time on bumbling around blindly. > > > > thanks in advance > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: WSOD on large number of elements in a form
If you haven't, turn on debug and tell us the debug information that you can see, look also at the source! Please provide the code for the Controller action in which the failure occur, so that we may be able to assist you better! Enjoy, John On Nov 2, 6:22 pm, Tonu Tusk wrote: > Hi, This is going to sounds a bit vague to start with, but I basically > have a form that has a lot of input boxes in it > ( > 500 text input boxes) and when this is posting back to the > controller I get the WSOD. > > I have turned off all of my actual processing code in my controller > and it did all work with a smaller number of input boxes, but now it > just white screens. > > As I mentioned, rewriting the controller code to just not even touch > the POSTed data but just to show some indication of status does not > affect things, there should be no (or next to no) processing of this > going on, but the controller definitely still works with exactly the > same code generating the forms, just a fewer number of inputs in the > form. > > I have altered my php settings from 8M post memory to 128M as well as > massively upping the memory allowed for > php scripts but still white screen. > > I don't know where to start I have tried chainging index.php in the > main entry call between generting the form and > posting it anywhere but again, I am just getting a whitescreen. > > Any help at all to point me where to look next would be welcome. If I > can't debug cake then it will be a good couple of months work down the > pan and I'll have to choose another option for framework etc as I > can't waste any more time on bumbling around blindly. > > thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Helper or Model Function?
Helpers are used in Views and if you pass data from the Controller to the View, then the Helper has access to the data. The View has no direct access to Model data. That is why I suggested using requestAction in an Element to get the needed data. Enjoy, John On Nov 2, 7:50 pm, dtirer wrote: > Hi John, thanks for the info. I'll give that a whirl > > A general question: do helpers have access to Model data, or would > you need to import the Model into the helper to access data like > that?. > > Im just getting into Helpers, Components, etc so I'm trying to figure > out when its best to use each > > On Nov 2, 12:25 pm, John Andersen wrote: > > > > > > > Based on the information you provided (not enough): > > > One possible solution is to have a separate Element to create the > > link, when the database contains the specific record. > > The element will use requestAction to query the database for the > > specific record, and display/not display the link depending on the > > reply. > > > Turn on cache for the element, so that the requestAction is only used > > once in each session. > > > Enjoy, > > John > > > On Nov 2, 5:40 pm, dtirer wrote: > > > > So here's my scenario. On a particular page, I want to display a link. > > > However, I only want to display this link if a particular record > > > exists in the database. > > > > Firstly, do helpers have access to DB/Model info? > > > > If so, should I make a helper to check if the records exists in the > > > DB? > > > > Whats the best way to do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Helper or Model Function?
Hi John, thanks for the info. I'll give that a whirl A general question: do helpers have access to Model data, or would you need to import the Model into the helper to access data like that?. Im just getting into Helpers, Components, etc so I'm trying to figure out when its best to use each On Nov 2, 12:25 pm, John Andersen wrote: > Based on the information you provided (not enough): > > One possible solution is to have a separate Element to create the > link, when the database contains the specific record. > The element will use requestAction to query the database for the > specific record, and display/not display the link depending on the > reply. > > Turn on cache for the element, so that the requestAction is only used > once in each session. > > Enjoy, > John > > On Nov 2, 5:40 pm, dtirer wrote: > > > So here's my scenario. On a particular page, I want to display a link. > > However, I only want to display this link if a particular record > > exists in the database. > > > Firstly, do helpers have access to DB/Model info? > > > If so, should I make a helper to check if the records exists in the > > DB? > > > Whats the best way to do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Helper or Model Function?
Based on the information you provided (not enough): One possible solution is to have a separate Element to create the link, when the database contains the specific record. The element will use requestAction to query the database for the specific record, and display/not display the link depending on the reply. Turn on cache for the element, so that the requestAction is only used once in each session. Enjoy, John On Nov 2, 5:40 pm, dtirer wrote: > So here's my scenario. On a particular page, I want to display a link. > However, I only want to display this link if a particular record > exists in the database. > > Firstly, do helpers have access to DB/Model info? > > If so, should I make a helper to check if the records exists in the > DB? > > Whats the best way to do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
WSOD on large number of elements in a form
Hi, This is going to sounds a bit vague to start with, but I basically have a form that has a lot of input boxes in it ( > 500 text input boxes) and when this is posting back to the controller I get the WSOD. I have turned off all of my actual processing code in my controller and it did all work with a smaller number of input boxes, but now it just white screens. As I mentioned, rewriting the controller code to just not even touch the POSTed data but just to show some indication of status does not affect things, there should be no (or next to no) processing of this going on, but the controller definitely still works with exactly the same code generating the forms, just a fewer number of inputs in the form. I have altered my php settings from 8M post memory to 128M as well as massively upping the memory allowed for php scripts but still white screen. I don't know where to start I have tried chainging index.php in the main entry call between generting the form and posting it anywhere but again, I am just getting a whitescreen. Any help at all to point me where to look next would be welcome. If I can't debug cake then it will be a good couple of months work down the pan and I'll have to choose another option for framework etc as I can't waste any more time on bumbling around blindly. thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
How to prevent Cross Site Foreign Script Attacks on your actions.
Given someone mails you a link with html images that tries to fetch http://domain.tld/users/add_friend/5 - now the user is logged into a web client that fetches that URL. How do you protect your cake application to not modify data. HTML wise this should be a PUT or POST method not a GET method, but how do I tell cakephp to ignore GET requests? How do I furthermore setup the link in my application's view ($html- >link()) to use PUT or POST instead of GET? Will this be possible without a ? Any tips? King regards ionas82 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Helper or Model Function?
So here's my scenario. On a particular page, I want to display a link. However, I only want to display this link if a particular record exists in the database. Firstly, do helpers have access to DB/Model info? If so, should I make a helper to check if the records exists in the DB? Whats the best way to do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Containable together with Translate Behavior
Had to add some facts: I removed AppModel's beforeFind and beforeSave (I forgot to write Config.language, which is used by Translate Behavior). So forget about these lines. Another important thing is, that field_a and field_b in my real world app are named equal. But tested it also with different names. Same result. I actually don't really know, how should be responsible for replacing field_a / field_b with I18n__field_a / I18n__field_b which comes from Translate Behavior. And I'm also not sure, if Translate Behavior works also for contained Models. Marco On 2 Nov., 16:22, Marco wrote: > Hi guys, > > i'm trying to combine Containable and Translate Behavior. > > My setup: > > Models: > A hasMany B > A Translate = 'field_a' > B belongsTo A > B Translate = 'field_b' > > Controllers: > A->contain('B'); > A->read(null, $id); > > AppModel: > beforeFind: > $this->locale = 'de_de'; > beforeSave: > $this->locale = 'de_de'; > > So what I expected was translated content for associated datasets of B > in reading A. But what automagically happens with field_a from > instance A, doesn't appear with field_b from instance B. I checked the > sql command. This seems to be correct. > > SELECT B.*, I18n__field_b.content FROM b AS B LEFT JOIN i18n AS > I18n__field_b ON (B.id = I18n__field_b.foreign_key AND > I18n__name_field_b.model = B AND I18n__field_b.field = field_b) WHERE > a_id = 1 AND I18n__field_b.locale = de_de > > Any suggestions? I don't know how to use it together. Of course I can > make the find call manually for B, but I wanted to use the normally > really good Containable Behavior. > > Thanks in advance. > Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Application Design Help
A very cool, didnt even think about doing it that way, had even started to look at mysql triggers to do it. Thankyou robustsolution! Tony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Containable together with Translate Behavior
Hi guys, i'm trying to combine Containable and Translate Behavior. My setup: Models: A hasMany B A Translate = 'field_a' B belongsTo A B Translate = 'field_b' Controllers: A->contain('B'); A->read(null, $id); AppModel: beforeFind: $this->locale = 'de_de'; beforeSave: $this->locale = 'de_de'; So what I expected was translated content for associated datasets of B in reading A. But what automagically happens with field_a from instance A, doesn't appear with field_b from instance B. I checked the sql command. This seems to be correct. SELECT B.*, I18n__field_b.content FROM b AS B LEFT JOIN i18n AS I18n__field_b ON (B.id = I18n__field_b.foreign_key AND I18n__name_field_b.model = B AND I18n__field_b.field = field_b) WHERE a_id = 1 AND I18n__field_b.locale = de_de Any suggestions? I don't know how to use it together. Of course I can make the find call manually for B, but I wanted to use the normally really good Containable Behavior. Thanks in advance. Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: CakePHP Application Design Help
you dont need to create a controller class for the settings table just create a model for the settings table In case user is not created with its settings (in the same add form), do the following in the User model put this function afterSave($created) { if($created) { $this->Setting->create(); $data['Setting']['user_id']=$this->id; $this->Setting->save($data); } } have a nice baking day --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP Application Design Help
Hi Guys, I am creating an application that hold user names / passwords and settings. So I have 2 tables in a DB, users and settings They have a hasOne relationship. I have come up to a little problem, When a new user is created i want to have a row in the settings table created too. is this possible through cake? or do I have to code a new class for it? I have enabled the dependant in the model so if the user is deleted the associate settings row gets removed, is there a setting that does the opposite so when a user is created it creates a blank settings row? Hope someone can help. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: Sanitize:: clean help
nice approach... euromark. On Nov 1, 9:23 am, "euromark (munich)" wrote: > way to complicated > > dont sanitize it > and use h() for output (text, varchar) > > that is way more handy than any other approach > > On 1 Nov., 06:44, Kyle Decot wrote: > > > Try echo $form->input("description",array("value"=>html_entity_decode(@ > > $this->data["Model"]["description"]))); > > > On Oct 31, 5:29 pm, "Dave" wrote: > > > > Can someone help me out with this fairly simple question. > > > > I am doing: > > > > $clean = new Sanitize(); > > > $this->data = $clean->clean($this->data); > > > > Now if a user enters quotes brackets or what not it gets converted to > > >