Re: Complex find neighbors query
On Aug 17, 4:07 am, Josh K wrote: > It seems like my problem is that find neighbors is ignoring 'value' => > $id. The $id is set to 8997, but it's returning 11 and 14 and the prev > and next options in the array. Your conditions don't look very conditiony either Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Improvement suggested for the CakeTestFixture class. Keywords: $records crashes when using non-uniform columns; simpletest
On Aug 16, 11:27 pm, BlueDuck wrote: > It drives me absolutely batty that all the $records have to have the > same columns or else the multiinsert fails. Under what circumstances do rows in the same table have a different schema? > Not sure if this is > really the most optimal code here, but this change in /var/www/ > wednesdays/cake/tests/lib/cake_test_fixture.php in the insert function > did the trick. I'd suggest that someone do a little optimization and > consider for the next release. The optimization is quite simply to not apply your suggested change :) > Also - no need to publish this post if > there you can route to the right place. > > Essentially, I move the multiinsert into the loop so that the field > list for each record is used instead of the field list from just the > last record. > > function insert(&$db) { > if (!isset($this->_insert)) { > $values = array(); > > if (isset($this->records) && !empty($this->records)) { > foreach ($this->records as $record) { > $fields = array_keys($record); > $values[0] = '(' . implode(', ', array_map(array(& > $db, 'value'), array_values($record))) . ')'; > $result = $db->insertMulti($this->table, $fields, > $values); > if ($result === false) return false; > } > } > return true; > } > } In doing that you've changed e.g. an insert with 500 items into 500 individual inserts. Here's a reference http://dev.mysql.com/doc/refman/5.1/en/insert.html The "why" you want to do this might yield a different and more useful bit of info. hth, AD Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Route passing parameters as an action as named parameters
Thanks, that will work any way to put 'product_slug' on $this- >params['named']['product_slug'] ? On 17 ago, 00:56, Andras Kende wrote: > Try somethign like: > > core/routes.php > > Router::connect('/area/:product_slug', array('controller'=> 'area', 'action' > => 'category'), array('pass' => array('product_slug'))); > > controller: > > public function category() { > $product = $this->Area->find('first', array('recursive' => -1, > 'conditions' => array('Area.slug' => $this->params['product_slug']))); > var_dump($product); > > } > > Andras Kendehttp://www.kende.com > > On Aug 17, 2010, at 1:29 AM, Mateo San Román wrote: > > > Hello > > > I'm trying to route an URL like this : > > > /area/maize > > > to this > > > /area/product:maize > > > Is this possible? > > > Thanks in advance > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > 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 > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Route passing parameters as an action as named parameters
Try somethign like: core/routes.php Router::connect('/area/:product_slug', array('controller'=> 'area', 'action' => 'category'), array('pass' => array('product_slug'))); controller: public function category() { $product = $this->Area->find('first', array('recursive' => -1, 'conditions' => array('Area.slug' => $this->params['product_slug']))); var_dump($product); } Andras Kende http://www.kende.com On Aug 17, 2010, at 1:29 AM, Mateo San Román wrote: > Hello > > I'm trying to route an URL like this : > > /area/maize > > to this > > /area/product:maize > > Is this possible? > > > Thanks in advance > > > > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > 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 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Route passing parameters as an action as named parameters
Hello I'm trying to route an URL like this : /area/maize to this /area/product:maize Is this possible? Thanks in advance Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Complex find neighbors query
It seems like my problem is that find neighbors is ignoring 'value' => $id. The $id is set to 8997, but it's returning 11 and 14 and the prev and next options in the array. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: General Questions.
Hi Neocrypter! It's easy! You can use JSON or XML to comunicate with your app. You don't need a special class, you can just take post data from any action in any controller. Example: In your controller: var $helpers = array('Xml'); function recieve_post() { //Saving external data $this->MyModel->save($this->data); $this->set('response', 'ok'); } In your view: $xml->serialize($response, array('format'=>'tags', 'root'=>'root_node'); or json_encode($response) If you want to count your data, in json's case you can do a string length > 1024 (if your encoding takes 2 bytes per char), the same with the result of xml serialize. And that's all. You probably will need to validate user session and other things but... well that's another price (?) :P 2010/8/16 Neocrypter : > Hello all I just discovered Cake last night and after playing with it > for a few moments I must say im impressed, I personally have never > truly worked with an MVC patten before and its been many years since > ive done any php work (around PHP 3) But I have taken up the mantel > of a developer again to help one of my associates with a project. I > ran through both the tutorials that are in the manual last night and > was amazed at how fast things were up and running, But before i dive > head first into my app I need to write i have a couple question, > > How hard is it to rig up a class to recive data from external > sources. I am writing an app in Second Life, which will send post data > to the website to stick in the db. I was looking at doing that with > Codeignighter but after working with it for a week and still not > having a simple CRUD app set up and working the way i think it should > ive decided to look around at other frameworks. > > also is there any functions to count the amount of data that cake will > send out in one chunk, im also going to be sending data back from the > site to the application in Second Life but there is a limit to the > amount of data that can be recived in one post 2kb to be exact.( im > well aware that there is probaly nothing to keep track of such a thing > built in but never hurts to ask ) > > Thanks > Neocrypter > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > 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 > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Improvement suggested for the CakeTestFixture class. Keywords: $records crashes when using non-uniform columns; simpletest
It drives me absolutely batty that all the $records have to have the same columns or else the multiinsert fails. Not sure if this is really the most optimal code here, but this change in /var/www/ wednesdays/cake/tests/lib/cake_test_fixture.php in the insert function did the trick. I'd suggest that someone do a little optimization and consider for the next release. Also - no need to publish this post if there you can route to the right place. Essentially, I move the multiinsert into the loop so that the field list for each record is used instead of the field list from just the last record. function insert(&$db) { if (!isset($this->_insert)) { $values = array(); if (isset($this->records) && !empty($this->records)) { foreach ($this->records as $record) { $fields = array_keys($record); $values[0] = '(' . implode(', ', array_map(array(& $db, 'value'), array_values($record))) . ')'; $result = $db->insertMulti($this->table, $fields, $values); if ($result === false) return false; } } return true; } } Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 basecamp clone (kilobit) installation issues
Hey there, firstly thanks for any support I receive from here on out! :) I've installed kilobit (http://bitbucket.org/bjornpost/cakephp- basecamp/) but having real troubles getting it to work. I've spoken to the creator and he gave me a few pointers, but my knowledge of cakephp is far too limited. So, here's what i've done. - Downloaded kilobit from bitbucket - downloaded cakephp - setup my database - moved the files to a subdomain rather than sub directory (as per author's suggestion) but im still getting the following errors and i think its because i havent defined my 'APP' setting. However, i've looked through the code and i cant find where i should be doing this. } else { $Dispatcher = new Dispatcher(); $Dispatcher->dispatch($url); $GLOBALS= array( "GLOBALS" => array( "GLOBALS" => array() ) ) require - APP/webroot/index.php, line 88 [main] - APP/index.php, line 23 I'd be really grateful for any help or pointers on this one. All the best Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Complex find neighbors query
I have a query that outputs a paginated list of records based on a staff member's region (comprised of states): --- $this->paginate = array('fields'=>array('Application.id'),'conditions'=>'Application.statuslist_id = Statuslist.id AND Application.state IN (SELECT S.shortname FROM states S INNER JOIN regions_states RS ON RS.state_id = S.id INNER JOIN regions R ON R.id = RS.region_id AND R.region IN ( SELECT R.region from staffs_regions SR, regions R where R.id = SR.region_id AND SR.staff_id='.$this->Session- >read("id").')) ' . $otherstatecondition . ' OR Application.staff_id = '.$this->Session->read("id"),'order'=>'Application.id desc','limit' => $limit, 'page' => 1,'recursive'=>'0','order'=>'Application.id desc'); $this->set('viewallinfo', $this->paginate('Application')); --- I need to use this query on each individual record to display a next and previous button, but I'm not sure I have the structure correct for find neighbors (http://book.cakephp.org/view/811/find-neighbors). --- $neighbors = $this->Application->find('neighbors', array('fields'=>'Application.id','conditions'=>'Application.statuslist_id = Statuslist.id AND Application.state IN (SELECT S.shortname FROM states S INNER JOIN regions_states RS ON RS.state_id = S.id INNER JOIN regions R ON R.id = RS.region_id AND R.region IN ( SELECT R.region from staffs_regions SR, regions R where R.id = SR.region_id AND SR.staff_id='.$this->Session- >read("id").')) ' . $otherstatecondition . ' OR Application.staff_id = '.$this->Session->read("id"),'value' => $id)); $this->set('neighbors', $neighbors); --- What should I do or what params are incorrect? The $this->paginate query works as expected. I'm just having trouble getting it to work with find neighbors. Thanks for the help. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
General Questions.
Hello all I just discovered Cake last night and after playing with it for a few moments I must say im impressed, I personally have never truly worked with an MVC patten before and its been many years since ive done any php work (around PHP 3) But I have taken up the mantel of a developer again to help one of my associates with a project. I ran through both the tutorials that are in the manual last night and was amazed at how fast things were up and running, But before i dive head first into my app I need to write i have a couple question, How hard is it to rig up a class to recive data from external sources. I am writing an app in Second Life, which will send post data to the website to stick in the db. I was looking at doing that with Codeignighter but after working with it for a week and still not having a simple CRUD app set up and working the way i think it should ive decided to look around at other frameworks. also is there any functions to count the amount of data that cake will send out in one chunk, im also going to be sending data back from the site to the application in Second Life but there is a limit to the amount of data that can be recived in one post 2kb to be exact.( im well aware that there is probaly nothing to keep track of such a thing built in but never hurts to ask ) Thanks Neocrypter Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Easy cake pagination!
Hi, Andy Dawson, i'm having a similar problem, but i don't understand your fix. On 8/16/10, AD7six wrote: > > > > On Aug 16, 4:27 pm, Abraham Boray wrote: > > Guys I'm lost, in the middle of a project I have to separate between > > two pictures form > >1- Pictures 4 the iPhone > >2- Pictures 4 the Web > > > > I get this array from the controller by callin : > > $this->Picture->recursive = 0; > > $this->set('pictures', $this->paginate()); > > > > the array is a set of pictures and the GAME (to which they belong) > > And every game have a CATEGORY > > > > Array > > ( > > [0] => Array > > ( > > [Picture] => Array > > ( > > [id] => 1 > > [name] => Image_15.png > > [type] => image/png > > [size] => 328004 > > [filesize] => 320 KB > > [ext] => png > > [group] => image > > [path] => /files/iPhone/Image_15.png > > [created] => 2010-08-02 16:19:33 > > [modified] => 2010-08-02 16:19:33 > > [type_id] => 30 > > ) > > ) > > > > [Game] => Array > > ( > > [0] => Array > > ( > > [id] => 9 > > [game_name] => Game2 > > [GamesPicture] => Array > > ( > > [id] => 43 > > [game_id] => 9 > > [picture_id] => 24 > > ) > > > > [Category] => Array > > ( > > [id] => 3 > > [name] => web > > ) > > ) > > ) > > ) > > > > So wot I want is to paginate this including just the web CATEGORY > > PICTURES(Filtring) > > WHERE CATEGORY.nam='web' > > > > I tried this but it'snot working : > > > /// > > > $this->set('pictures', $this->paginate('conditions' => > > array('Category.name' => 'web'))); > > > > this is the database structure so to get a clearer IDEA. > > > /// > > > Field TABLE PICTURE > > id > > name > > type > > size > > int(11) > > filesize > > group > > type_id int(11) > > > > Field TABLE GAME > > id > > game_name > > start_date > > end_date > > category_id > > > why not use this field instead of a needless join to your unshown > category TABLE > > yours with a capital word at the end of the LINE > > AD > > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > 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.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > -- OKALANY DANIEL, P.O BOX 26150, Kampala., Uganda. http://okasoft.net -- When confronted by our worst nightmares, the choices are few; Fight or flight. We hope to find the strength to stand against our fears but sometimes, despite ourselves, we run. What if the nightmare gives chase? Where can we hide then? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Strange problem with form helper...
Ohh, I think that's the problem. It looks enabled, but when I don't allow access to "login" action it still allows. Here's the full app_controller.php code: class AppController extends Controller { var $components = array('Auth'); function beforeFilter() { parent::beforeFilter(); $this->helpers[] = 'Menu'; $this->Auth->userModel = 'Player'; $this->Auth->allow('login', 'register'); $this->Auth->fields = array( 'username' => 'name', 'password' => 'password' ); } } On Aug 16, 9:13 pm, Miles J wrote: > Do you have the Auth component enabled? > > On Aug 16, 2:04 am, Zippoxer wrote: > > > > > This is the form code in the view: > > > echo $form->create('Player'); > > echo $form->input('name', array('label' => 'Name')); > > echo $form->input('password', array('label' => 'Password')); > > echo $form->end('Login'); > > ?> > > > And in the controller I just do: > > print_r($this->data); > > > Then I see an array with the username and password, but the password > > is always empty. > > > On Aug 16, 6:16 am, Sam wrote: > > > > We need more info... can you paste your view, and perhaps your > > > controller action? > > > > On Aug 15, 1:24 pm, Zippoxer wrote: > > > > > I've created a simple authentication form with username and password > > > > input fields. > > > > The problem is that the password is always empty through $this->data > > > > in the controller, but username is not empty. > > > > What's the problem? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Strange problem with form helper...
That's how my app_controller.php begins: class AppController extends Controller { var $components = array('Auth'); On Aug 16, 9:13 pm, Miles J wrote: > Do you have the Auth component enabled? > > On Aug 16, 2:04 am, Zippoxer wrote: > > > > > This is the form code in the view: > > > echo $form->create('Player'); > > echo $form->input('name', array('label' => 'Name')); > > echo $form->input('password', array('label' => 'Password')); > > echo $form->end('Login'); > > ?> > > > And in the controller I just do: > > print_r($this->data); > > > Then I see an array with the username and password, but the password > > is always empty. > > > On Aug 16, 6:16 am, Sam wrote: > > > > We need more info... can you paste your view, and perhaps your > > > controller action? > > > > On Aug 15, 1:24 pm, Zippoxer wrote: > > > > > I've created a simple authentication form with username and password > > > > input fields. > > > > The problem is that the password is always empty through $this->data > > > > in the controller, but username is not empty. > > > > What's the problem? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Change the File Name for a Model
Why are you using App::import()? Just use the ole regular include_once. On Aug 14, 3:13 pm, sanedevil wrote: > Thanks again guys! > > @AD7six, i checked the app::import, but couldn't figure out a way that > will help me. can u pls enlighten me? > > On Aug 13, 4:31 pm, AD7six wrote: > > > On Aug 13, 4:19 pm, sanedevil wrote: > > > > Thanks all guys! > > > > seems i cant achieve what i want. I'll change the class name and make > > > the changes elsewhere in the app. > > > > as a sidenote (and a general query), cake stresses on convention over > > > configuration, but doesn't it provide configuration for the desperate > > > and crazy cases (like me ;-) )? > > > Ps if your model class is named Con *only* because the db table is > > named cons - then just useTable your way out of that paper bag. > > > Pps - filenames should be lower case. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 can I display CakePHP input validation errors in a different container input
Do you mean something like this? http://milesj.me/blog/read/10/Displaying-Form-Errors-As-A-List-In-CakePHP On Aug 15, 8:35 am, euromark wrote: > if you bake your views/forms > this should be done automatically > > IF you set up your model relations accordingly anyway > maybe somethings wrong here > you should post your code for details > > On 15 Aug., 16:30, Petr Vytlaèil wrote: > > > Hi I will try to describe my problem better: > > > I have database tables addresses and user so i have two models User > > and Address. > > User haveone malingaddress (class Address) and billaddress (class > > Address) this is definate in model User. > > How is registration form where are inputs for information about user > > some: User.name, User.phone ... > > And inputs for Mailing and billing address: Mailingaddress.street, > > Billingaddress.street > > > -- now i want before save this data to database valid inputs with > > validations rules from model Address, source: > > > > > $this->Address->create($this->data['Maillingaddress']); > > if($this->Address->validate()$this->data['Maillingaddress']){ > > $this->Address->save($this->data['Maillingaddress']);} > > > And now when data arent valid a want show errors in form, but Form > > helper get errors for inputs in form from model and data model name > > isnt some as name input form: > > Address.street != Mallingaddress.street > > > Is any way how a cane prepare this errors and send to helper? > > > Have you understand? > > > On 15 srp, 10:10, "rez...@gmail.com" wrote: > > > > what's meant of redirect this errors for concrete input or group > > > inputs ? > > > really I want to help you > > > Sorry , I can't understand what you want Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Strange problem with form helper...
Do you have the Auth component enabled? On Aug 16, 2:04 am, Zippoxer wrote: > This is the form code in the view: > echo $form->create('Player'); > echo $form->input('name', array('label' => 'Name')); > echo $form->input('password', array('label' => 'Password')); > echo $form->end('Login'); > ?> > > And in the controller I just do: > print_r($this->data); > > Then I see an array with the username and password, but the password > is always empty. > > On Aug 16, 6:16 am, Sam wrote: > > > We need more info... can you paste your view, and perhaps your > > controller action? > > > On Aug 15, 1:24 pm, Zippoxer wrote: > > > > I've created a simple authentication form with username and password > > > input fields. > > > The problem is that the password is always empty through $this->data > > > in the controller, but username is not empty. > > > What's the problem? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Agile "Stories" Project Management Internal Web App for CakePHP?
http://code.google.com/p/phpspec/ Sent from my iPhone On Aug 16, 2010, at 10:48 AM, Parris wrote: Hello, I was wondering if anyone knows of a project management app written in cakephp. Trying to setup projects, divide them out into stories, etc etc... Thanks!!! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Agile "Stories" Project Management Internal Web App for CakePHP?
Hello, I was wondering if anyone knows of a project management app written in cakephp. Trying to setup projects, divide them out into stories, etc etc... Thanks!!! Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Session call from other app
Don´t know how cron is working. do you know good tutorials about this thema. 2010/8/16 Zaky Katalan-Ezra > Ping the database for every 20 sec with AJAX and in every new page load. > In every ping update the session modified column. > In chat check if a session exists and if the modified value is newer the 40 > sec. > Delete the session row at logout and run cron every hour to delete dead > sessions in order to keep the table "clean" > > Check out the new CakePHP Questions site http://cakeqs.org and help > others with their CakePHP related questions. > > 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.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Session call from other app
Ping the database for every 20 sec with AJAX and in every new page load. In every ping update the session modified column. In chat check if a session exists and if the modified value is newer the 40 sec. Delete the session row at logout and run cron every hour to delete dead sessions in order to keep the table "clean" Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 dive into CakePHP after having worked with RoR for a while?
On Aug 16, 5:13 pm, psybear83 wrote: > Hi all > > I have worked with RoR in the period of let's say 2007 to 2009... I > didn't work as a professional with it but as a hobby, but I know quite > something about RoR, I guess. > > I'm working for a new company now, and they are using CakePHP. So now > I have to dive into CakePHP after knowing quite a lot already about > RoR. So is there maybe a fast way to do that? well, you should start with the book.cakephp.org and do the blog tutorial. > So I'm not wasting too > much time for stuff I already know? skip anything you find obvious (do not simply skip the whole blog tutorial - it's the most important 15-30 minutes of your experience with cakephp). Rewind when the bit you skipped turns out to be different and important ;) AD Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Contain pulling extra info
Yep! I took your advice. You just to fast on the response email :) Thanks Dave -Original Message- From: euromark [mailto:dereurom...@googlemail.com] Sent: August-16-10 1:13 PM To: CakePHP Subject: Re: Contain pulling extra info i just told you what to do :) Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Contain pulling extra info
Thanks I just used $this->User->recursive = -1; Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Contain pulling extra info
i just told you what to do :) On 16 Aug., 17:27, "Dave Maharaj" wrote: > I only need User data nothing else, I thought contain => false is saying > that I need the User data and don't bother getting anything else but it's > getting Comments and Gallery which I do not need. > > Ideas? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Contain pulling extra info
I only need User data nothing else, I thought contain => false is saying that I need the User data and don't bother getting anything else but it's getting Comments and Gallery which I do not need. Ideas? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Contain pulling extra info
tip: use "contain = array()" this is the same as recursive = -1 and therefore no related table is contained On 16 Aug., 17:09, Jeremy Burns | Class Outfit wrote: > By saying that 'contain' = false you aren't specifying any containments. It > looks as if you are just going to recursive level 1. > > Jeremy Burns > Class Outfit > > jeremybu...@classoutfit.comhttp://www.classoutfit.com > > On 16 Aug 2010, at 16:05, Dave Maharaj wrote: > > > I have a simple function: > > > public function __getUserFromEmail($email) > > { > > $params = array( > > 'contain' => false, > > 'conditions' => array( > > 'User.email' => $email), > > 'fields' => array( > > 'User.first_name', > > 'User.last_name', > > 'User.email', > > 'User.password', > > 'User.id', > > //'User.reset', > > 'User.confirm_code')) > > ; > > > return $this->find('first', $params); > > } > > > When I debug the data returned I get User , Gallery and Comment model data > > even though contain set to false. > > > User hasMany Comments > > User hasMany Galleries > > > Any ideas where I am going wrong? > > > Thanks > > > Dave > > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others > > with their CakePHP related questions. > > > 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 > > athttp://groups.google.com/group/cake-php?hl=en Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 dive into CakePHP after having worked with RoR for a while?
Hi all I have worked with RoR in the period of let's say 2007 to 2009... I didn't work as a professional with it but as a hobby, but I know quite something about RoR, I guess. I'm working for a new company now, and they are using CakePHP. So now I have to dive into CakePHP after knowing quite a lot already about RoR. So is there maybe a fast way to do that? So I'm not wasting too much time for stuff I already know? Thanks a lot for answers... :-) Joshua Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Contain pulling extra info
By saying that 'contain' = false you aren't specifying any containments. It looks as if you are just going to recursive level 1. Jeremy Burns Class Outfit jeremybu...@classoutfit.com http://www.classoutfit.com On 16 Aug 2010, at 16:05, Dave Maharaj wrote: > I have a simple function: > > public function __getUserFromEmail($email) > { > $params = array( > 'contain' => false, >'conditions' => array( > 'User.email' => $email), > 'fields' => array( > 'User.first_name', > 'User.last_name', > 'User.email', > 'User.password', > 'User.id', > //'User.reset', > 'User.confirm_code')) > ; > > return $this->find('first', $params); > } > > When I debug the data returned I get User , Gallery and Comment model data > even though contain set to false. > > User hasMany Comments > User hasMany Galleries > > Any ideas where I am going wrong? > > Thanks > > Dave > > Check out the new CakePHP Questions site http://cakeqs.org and help others > with their CakePHP related questions. > > 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 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Contain pulling extra info
I have a simple function: public function __getUserFromEmail($email) { $params = array( 'contain' => false, 'conditions' => array( 'User.email' => $email), 'fields' => array( 'User.first_name', 'User.last_name', 'User.email', 'User.password', 'User.id', //'User.reset', 'User.confirm_code')) ; return $this->find('first', $params); } When I debug the data returned I get User , Gallery and Comment model data even though contain set to false. User hasMany Comments User hasMany Galleries Any ideas where I am going wrong? Thanks Dave Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Autocomplete result not shown
Hi group! After reading many pages and this group I'm not able to find my bug, why my result of the autocomplete-request is not shown on my page. Here's what I have so far: controller: -- class RadacctsController extends AppController { var $name = 'Radaccts'; var $helpers = array('Html', 'Form', ''Ajax', 'Number', 'Time'); var $uses = array('Radacct', 'Radcheck'); function autoComplete(){ $this->set('results', $this->Radcheck->find('all', array( 'conditions' => array( 'Radcheck.UserName LIKE' => $this->data['Radacct'] ['Username'].'%', ), 'limit' => '15', 'fields' => array('username') ))); $this->layout = 'ajax'; } my view "index.ctp" link('scriptaculous-1.8.3/lib/prototype'); echo $javascript->link('scriptaculous-1.8.3/src/scriptaculous'); echo $ajax->form(array( 'type' => 'post', 'options' => array( 'update'=>'login_liste', 'url' => array( 'controller' => 'radaccts', 'action' => 'autoComplete' ) ) ) ); echo $ajax->autoComplete('Radacct.Username', '/radaccts/ autoComplete'); echo $form->end('Show logins'); echo $ajax->div('login_liste'); ?> and my view auto_complete.ctp - params); ?> What is strange is, I have to press the "submit"-button to get the request sent. In the wireshark-trace I see the request and afterwards the result "my results. So were is the but to have shown my results under the input-field? Thanks for your help Oliver Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Using Felxigrid with Cake
hello..i'm still new in cakephp.. is there anybody know how to combine Flexigrid with cakephp ? Thx. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Easy cake pagination!
On Aug 16, 4:27 pm, Abraham Boray wrote: > Guys I'm lost, in the middle of a project I have to separate between > two pictures form > 1- Pictures 4 the iPhone > 2- Pictures 4 the Web > > I get this array from the controller by callin : > $this->Picture->recursive = 0; > $this->set('pictures', $this->paginate()); > > the array is a set of pictures and the GAME (to which they belong) > And every game have a CATEGORY > > Array > ( > [0] => Array > ( > [Picture] => Array > ( > [id] => 1 > [name] => Image_15.png > [type] => image/png > [size] => 328004 > [filesize] => 320 KB > [ext] => png > [group] => image > [path] => /files/iPhone/Image_15.png > [created] => 2010-08-02 16:19:33 > [modified] => 2010-08-02 16:19:33 > [type_id] => 30 > ) > ) > > [Game] => Array > ( > [0] => Array > ( > [id] => 9 > [game_name] => Game2 > [GamesPicture] => Array > ( > [id] => 43 > [game_id] => 9 > [picture_id] => 24 > ) > > [Category] => Array > ( > [id] => 3 > [name] => web > ) > ) > ) > ) > > So wot I want is to paginate this including just the web CATEGORY > PICTURES(Filtring) > WHERE CATEGORY.nam='web' > > I tried this but it'snot working : > /// > > $this->set('pictures', $this->paginate('conditions' => > array('Category.name' => 'web'))); > > this is the database structure so to get a clearer IDEA. > /// > > Field TABLE PICTURE > id > name > type > size > int(11) > filesize > group > type_id int(11) > > Field TABLE GAME > id > game_name > start_date > end_date > category_id why not use this field instead of a needless join to your unshown category TABLE yours with a capital word at the end of the LINE AD Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
Easy cake pagination!
Guys I'm lost, in the middle of a project I have to separate between two pictures form 1- Pictures 4 the iPhone 2- Pictures 4 the Web I get this array from the controller by callin : $this->Picture->recursive = 0; $this->set('pictures', $this->paginate()); the array is a set of pictures and the GAME (to which they belong) And every game have a CATEGORY Array ( [0] => Array ( [Picture] => Array ( [id] => 1 [name] => Image_15.png [type] => image/png [size] => 328004 [filesize] => 320 KB [ext] => png [group] => image [path] => /files/iPhone/Image_15.png [created] => 2010-08-02 16:19:33 [modified] => 2010-08-02 16:19:33 [type_id] => 30 ) ) [Game] => Array ( [0] => Array ( [id] => 9 [game_name] => Game2 [GamesPicture] => Array ( [id] => 43 [game_id] => 9 [picture_id] => 24 ) [Category] => Array ( [id] => 3 [name] => web ) ) ) ) So wot I want is to paginate this including just the web CATEGORY PICTURES(Filtring) WHERE CATEGORY.nam='web' I tried this but it'snot working : /// $this->set('pictures', $this->paginate('conditions' => array('Category.name' => 'web'))); this is the database structure so to get a clearer IDEA. /// Field TABLE PICTURE id name type size int(11) filesize group type_id int(11) Field TABLE GAME id game_name start_date end_date category_id modified Field TABLE Games_pictures id game_id picture_id Thank u guys 4 ur future help, I'm stuck and got really to get this done as soon as I can Fix it Thank u in advance {A|B} Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Route question
Thanks guys. Dave -Original Message- From: Dr. Loboto [mailto:drlob...@gmail.com] Sent: August-16-10 4:10 AM To: CakePHP Subject: Re: Route question Html->link(__('View', true), array('controller' => 'galleries' , 'action' => 'view', 'gal_slug' => $gallery['Gallery'] ['slug'])); ?> On Aug 16, 8:02 am, "Dave Maharaj" wrote: > I have my gallery controller and each gallery has a slug so the url looks > like gallery/fishing (if manually typed in) > > Routed like -> Router::connect('/gallery/:gal_slug',array('controller' => > 'galleries' , 'action' => 'view'), array( 'gal_slug' => > '[-_A-Za-z0-9]+','pass' => array('gal_slug' ) ) ); > > Then in my gallery index.ctp I have Html->link(__('View', > true), array('controller' => 'galleries' , 'action' => 'view', > $gallery['Gallery']['slug'])); ?> but the url when hover/clicked over the > link shows "view" -> gallery/view/fishing. > > How can I get it so it removes the "view" from the url? > > Thanks > > Dave Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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 Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Looking for presentation theme fot CakePHP
No offense Bernard, this is like drawing out your own color-by-number drawing then asking what colors you should make each section. Themes are for the people receiving the color-by-number drawing not the person creating them. On Aug 14, 4:48 am, Bernard_Ballesta wrote: > Anyone knows about off the shelve presentation themes (styles sheets) > to change look and feel of applications ? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: can't delete record from table
A function stops executing when return is called. Your return is before your delete. Though deleting a record in a function called __getRecord sounds like poor form to me. On Aug 15, 6:14 am, Tomfox Wiranata wrote: > hi, > > i am trying to delete a record from a table. to do that i call a > different model from my controller. anyway, i can retrieve the correct > data perfectly, that tells me the process is right. but i can't delete > a specifi record. first i declared the foreign model in my controller > > var $uses = array('User', 'Test'); > > now i am retreiving the first record from that table, "tests". it > happens in my controller: > > function __getRecord() > { > $erg = $this->Test->find('first'); > $id = $erg['Test']['id']; > > $this->set('proxies', $erg); > return $erg['Test']['name']; > $this->Test->delete($id); > } > > After i got it i want to delete it from the table so i am passing the > $id to the delete function. but cake just wont delete the record. > > i checked. the correct id is passed... > > i am calling this function like > $this->Session->write('abc.test', $this->__getRecord()); > > can u see the problem? looking forward to your help :) > THX Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Session call from other app
I understand thats a good idea. But what if the user don´t logout, than the database entry never be killed or i missunderstand something? Could i kill that entry if he only close the browser and not logged out`? 2010/8/16 Hashim Ikram > Hi, > I think you should use database for this problem as, > create a table to keep info about logged in users, when a user log in > insert a row in that table having information about user,ip-address and log > in time etc. > when a user log-out delete the row against that ip-address. > One the other app which is dealing with chat, connect to that database and > check that is there any session entry against that ip-address if yes then it > means the user is logged in else not logged in. > > Regards > Hashim Ikram > > On Mon, Aug 16, 2010 at 12:51 AM, Davor Ilic wrote: > >> Hi, >> >> does anyone know an answer for my issue? >> >> thanks >> >> 2010/8/11 Davor Ilic >> >> Hi, >>> >>> how i can use sessions in cake. My problem is i have two different apps >>> on my webserver runing. >>> >>> With the one the user can registrate and login. And this one crates an >>> session. >>> >>> Now the other app an chat would call with popup. My problem here is how >>> to call the session which is seted by the other weblogin. >>> >>> I need now to know which session is set for the user to use it for my >>> chatapp, how i call the session from other webapp. >>> >>> >>> >> Check out the new CakePHP Questions site http://cakeqs.org and help >> others with their CakePHP related questions. >> >> 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.comFor >> more options, visit this group at >> http://groups.google.com/group/cake-php?hl=en >> > > Check out the new CakePHP Questions site http://cakeqs.org and help > others with their CakePHP related questions. > > 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.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Performance Problems using remote database
Thanks jmn2k1 and djogo for the new answers here.. I'm really using IP Address instead hostname for database connection.. Guys, I Haven't tried the proposed solutions yet, but this week I'll try them all.. (these days I'm running against time to put some things in order here.. haha).. Thanks for the help. Thiago Elias. 2010/8/13 djogo > jmn2k1, sometimes even the network routing messes with database access > speed... We had a problem in which every request passed by the > firewall, even to our own servers! The firewall couldn't handle the > traffic, therefore everything (internet and intranet access) was so > slow. > > > On Aug 13, 11:17 am, jmn2k1 wrote: > > Not necessarily your case but once I had a similar problem, it turns > > out I was using a hostname for the database server that need to do a > > DNS checkout and hence slow the app down. If you're using the ip then > > this is not the case. > > > > On Aug 12, 10:14 am, Thiago Elias wrote: > > > > > Hey Guys.. > > > > > Thanks everyone for the answers.. I'll try them all here today, and > I'll > > > post the results soon as possible.. > > > > > 2010/8/12 djogo > > > > > > Hi Thiago, > > > > > > I would try to replicate the entire system (lampp + your app + > > > > database) in other server and check whether the "slowness" is due to > > > > the server or not. You may also replicate a legacy PHP app, as you > > > > call it, to check if it works well too. This replicated server will > > > > allow you to test other experiments without jeopardizing your real > > > > production data. > > > > > > If the performance in the replicated server is equivalent to your > > > > original one, check if its something in the cakephp lib. Create a > > > > controller that doesn't use any models at all. If it's also slow, > than > > > > the problem is something about your cake, or its configuration. If > > > > it's not, then it's probably your database. > > > > > > Then you can start thinking about database optimization. Is all > > > > queries slow? Try a simple "SELECT 1 FROM DUAL" in the legacy PHP and > > > > in cakePHP. how many milisseconds each one takes (test both on the > > > > browser)? Is AppController->beforeFilter doing something that may be > > > > slowing down your queries? > > > > > > Turn debug to 2 and for each query that it reports, check how much > > > > time is it taking (it's right beside the query name). Try to run the > > > > same query on the database directly and check if the timing is > > > > compatible. > > > > > > When my apps turn slow, I always think of the DB. Sometimes, it's > just > > > > a matter of creating the right indexes - for instance, if you run > > > > "SELECT marafo_id, count(*) from naosei group by marafo_id", it'll be > > > > really slow when you have lots (>100K) of rows and the grouped column > > > > is not indexed. A simple "CREATE INDEX index_naosei_marafo_id ON > > > > naosei (marafo_id);" would solve this problem. > > > > > > Well, keep us all informed about these results. I'm very interested > > > > because every once in a while I (and may I add, everybody =]) run > into > > > > this kind of problem too. > > > > > > dfcp > > > > > > On 11 ago, 22:29, Thiago Elias wrote: > > > > > Hi All, > > > > > > > Since two or three months ago (more or less), I'm experiencing some > > > > problems > > > > > involving CakePHP. > > > > > > > In the past, our application was using a local database connection, > and > > > > > performance was really nice and acceptable. Some months ago, we had > to > > > > > migrate the application to another server, separating the Data and > the > > > > Apps. > > > > > > > After this change, I've lost performance in my cake App. Each > request > > > > takes > > > > > around 10 ~ 15 seconds, and before, was 2 ~ 3,5 secs. > > > > > The interesting thing is: The other legacy PHP Apps are 100% fast, > and > > > > even > > > > > other cakeAPPs are fast too, but the difference is: My main cake > app (the > > > > > one that lost performance) have 80 innoDB Tables and 20 views. > (used to > > > > link > > > > > to another databases). > > > > > > > I'm using CakePHP 1.2.7, PHP 5.2. And in the Database Server, MySQL > > > > Server > > > > > 5.1. > > > > > Our network infrastructure is really fast, and ping response > between > > > > servers > > > > > is really nice. > > > > > > > Does anyone knows why I'm losing performance just in this App when > > > > connected > > > > > to a remote server ?! I'm using CakePHP Debug, and ~85% of the time > spent > > > > in > > > > > the request is lost in the CORE, and not in the app. (The core is > the > > > > same > > > > > of the other cakeApps..) > > > > > > > Please help-me (and sorry for my bad english). > > > > > > > Thiago Elias > > > > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp > others > > > > with their CakePHP related questions. > > > > > > You received this message because you are subscribed to the Google > Groups > > > > "CakePHP
Validation errors not being displayed
My Order model belongsTo both a DeliveryContact and a BillingContact. It looks like this: class Order extends AppModel { var $belongsTo=array( 'DeliveryContact'=>array( 'className'=>'Contact' ), 'BillingContact'=>array( 'className'=>'Contact' ) ); } My view looks like this: echo $form->create('Order'); echo $form->input('DeliveryContact.name'); echo $form->input('DeliveryContact.address'); echo $form->end('Next'); And in my controller action for this view I have something like: $this->Order->DeliveryContact->set($this->data['DeliveryContact']); if ($this->Order->DeliveryContact->validates()) { proceedToNextStep(); } The validation errors are not being pulled through properly. If I do debug($this->validationErrors) in my view I get: Array ( [Contact] => Array ( [name] => Please enter your name [address] => Please enter your address ) ) Clearly I need to be populating View::validationErrors['DeliveryContact'] instead of View::validationErrors['Contact'], but I don't know how to accomplish this, any ideas? Thanks Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Session call from other app
Hi, I think you should use database for this problem as, create a table to keep info about logged in users, when a user log in insert a row in that table having information about user,ip-address and log in time etc. when a user log-out delete the row against that ip-address. One the other app which is dealing with chat, connect to that database and check that is there any session entry against that ip-address if yes then it means the user is logged in else not logged in. Regards Hashim Ikram On Mon, Aug 16, 2010 at 12:51 AM, Davor Ilic wrote: > Hi, > > does anyone know an answer for my issue? > > thanks > > 2010/8/11 Davor Ilic > > Hi, >> >> how i can use sessions in cake. My problem is i have two different apps on >> my webserver runing. >> >> With the one the user can registrate and login. And this one crates an >> session. >> >> Now the other app an chat would call with popup. My problem here is how to >> call the session which is seted by the other weblogin. >> >> I need now to know which session is set for the user to use it for my >> chatapp, how i call the session from other webapp. >> >> >> > Check out the new CakePHP Questions site http://cakeqs.org and help > others with their CakePHP related questions. > > 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.comFor > more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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: Strange problem with form helper...
This is the form code in the view: create('Player'); echo $form->input('name', array('label' => 'Name')); echo $form->input('password', array('label' => 'Password')); echo $form->end('Login'); ?> And in the controller I just do: print_r($this->data); Then I see an array with the username and password, but the password is always empty. On Aug 16, 6:16 am, Sam wrote: > We need more info... can you paste your view, and perhaps your > controller action? > > On Aug 15, 1:24 pm, Zippoxer wrote: > > > > > I've created a simple authentication form with username and password > > input fields. > > The problem is that the password is always empty through $this->data > > in the controller, but username is not empty. > > What's the problem? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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