Re: HELP - Session Files not created on ISP but created on localhost ??

2015-01-21 Thread kdubya
Dave, I was having (what seems like) the exact same problem. You can read the thread about it here: https://groups.google.com/forum/#!topic/cake-php/ORfK1b9AYTU My solution was to put CakeSession::start() in the beforeFilter() method in my AppController. Everything seems to work fine then. How

Re: Session date missing after redirect

2015-01-21 Thread kdubya
I have found a work-around for this problem. I found that Sessions were not being started (on redirect after Auth login) on the server that had PHP 5.4.36 and Cake 2.x. My first work-around was to set session.auto_start=1 in my php.ini file. The Sessions and Auth login worked properly then. I

Re: Session date missing after redirect

2015-01-19 Thread kdubya
Euromark, Thanks for your response. I updated my version of CakePHP to the 2.6.1. Now I can change the setup so that session cookies on the server are written to /app/tmp/sessions. I now see the cookies - each with a name like sess_abd5g143. The client-side cookie content is the GUID that m

Re: Session date missing after redirect

2015-01-19 Thread kdubya
A kind person on IRC suggested that the problem might be fixed by going to the latest version of Cake. So I updated to 2.6.1 and the problem still exists. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message becaus

Re: Session date missing after redirect

2015-01-19 Thread kdubya
Another factor that might have a bearing on this: the old server had PHP 5.2.17 - the new server has 5.4.36. In my original post I said I had a CakePHP 2.3 and a 1.3 app that were misbehaving. When I switched the 1.3 app to use Session.default='cake', it started working. Now I can switch it bac

Re: Session date missing after redirect

2015-01-19 Thread kdubya
I have tried changing the Session settings in core.php. I have tried both Configure::write('Session', array('defaults' => 'cake')); and 'database'. Each time I do that my error.log fills up with repeated errors that begin: 2015-01-18 17:15:13 Error: [CakeSessionException] Unable to configure the

Session date missing after redirect

2015-01-18 Thread kdubya
First let me say I have looked for answers to this on this forum and in the Book but nothing seems to fit. I have also posted this question on StackOverflow and I apologize if any one is offended by my posting it both places. I have 3 working apps that I am moving from one production server t

Re: PHPExcel (File format or extension not valid)

2014-10-20 Thread kdubya
In you post you say: "... however after I created file(which is xslx format),..." > Maybe this is just a typo in your post and not in your code (you don't show the actual code) but that is NOT the correct extension. It should be ".xlsx" for Excel files since Office 2007. Go back and check the e

Re: encrypt and decrypt password

2014-10-15 Thread kdubya
Are you serious?!?!? This group is dedicated to CakePHP - a framework written in PHP for creating applications. It is NOT for beginning PHP users who first need to learn the PHP language. You might want to start by learning the basics of the language by going to: http://php.net/manual/en/tutoria

Re: Subqueries, how to do this correctly?

2014-04-28 Thread kdubya
You should make a belongsTo association between Submits and Categories. If you do this, Cake will automatically retrieve the data you are looking for when you do a find() on Submits. To learn more about this go to: http://book.cakephp.org/2.0/en/models/associations-linking-models-together.html

Re: Saving related model´s name

2014-04-09 Thread kdubya
Oops, I see a type in my previous post: 'className' => 'Phonr' should be 'className'=>'Phone' Sorry about that. Ken -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google G

Re: Saving related model´s name

2014-04-09 Thread kdubya
It sounds to me like you want Client and Vendor (for example) and Employee (as another example) all to store their associated phone numbers (mobile, home, etc) in a single model called Phone. If this is correct, when saving a record in Phone, you would need to know which model the record is ass

Re: Is Cake Dead Or Just Catching Up?

2014-03-12 Thread kdubya
I'm taking the bait: Looking at the article and the pie chart I have the following observations: Given that the bottom 8 "frameworks" ("pear" is a framework?) all have a response of 1.50% (likely one response each) and the intervals between the other groups (Zend 1 and "none" likely had 2 respo

Re: How to update data in several models in a single Web Service?

2014-03-09 Thread kdubya
Your statement "the problem with CakePHP is that it only allows a controller to access its own corresponding model's data" is just flat wrong. You can access additional models in a controller by simply adding the model name to the $uses variable in the controller class. For example, the followi

Re: Spaces in Field Names

2014-03-05 Thread kdubya
> > I had never heard of a DB that allows spaces in field names so I Googled > it. Apparently, Access allows spaces, maybe other do too. Two different > posts suggest enclosing the field names in square brackets : '[...]' > See http://stackoverflow.com/questions/10920671/how-do-you-deal-with-

Re: Setting up CakePHP to Web server

2014-03-03 Thread kdubya
You haven't given us much to go on. What if any error messages do you get? Is your server configured to allow local .htaccess files? What kind of server is it? *nix, Windows? Ken -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You

Re: I have problems in sending mail . Help ....

2014-02-16 Thread kdubya
You say you are running on Windows 7 which means you probably don't have an SMTP mail server running unless you have specifically set one up. I do development on a Win 7 machine but for Email testing I use my production linux server. So in my email.php file instead of using localhost, I point

Re: Certain models via $uses cause non-object errors in Controller

2013-12-10 Thread kdubya
Post the complete code of one of the Models (the smallest) that causes the problem. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscri

Re: cakephp not connected

2013-10-19 Thread kdubya
This is a terrible post - you gave nothing for anyone to go on. Have you created the database? Have you modified Config/database.php so it has the correct credentials to connect to the database? Have you followed the tutorial on how to install CakePHP at http://book.cakephp.org/2.0/en/getting-s

Re: cake php

2013-10-14 Thread kdubya
You are not going to get much help with a post like this. The people in this group are not here to do your work for you. And saying that it is urgent makes me think it is a school assignment. What is a "frontend editor" - you have not described your task very well. What have YOU done so far to

Re: Display dynamic checkbox in cakephp using Jquery

2013-09-17 Thread kdubya
You have multiple problems. First, the fact that you are getting the "method in controller could not be found" message means your routing is not correct. Try looking at http://book.cakephp.org/2.0/en/core-libraries/components/request-handling.html#RequestHandlerComponent Second, at the end of y

Re: CakePHP BlueHost Shared Hosting

2013-09-15 Thread kdubya
Is the Webroot you show in your directory structure the CakePHP one? If so, you have put it in the wrong place. It should be app/webroot (unless you want to do non-standard setup - if so you need to look very carefully at how you configure your .htaccess directives). It seems like you are just

Re: Defining root directory for shared hosting

2013-09-12 Thread kdubya
You should NOT need to change anything in the file app/index.php. You have not given enough information about you installation for us to help. For instance, where (in relation to your webserver document root) did you put CakePHP. If you did a standard installation and put it in the document root

PHP output_buffering setting and redirect() in 2.3

2013-08-26 Thread kdubya
I just ran into something a little weird. I have an app that I recently converted from 1.3 to 2.3 (2.3.9 to be exact). Everything was working fine in both versions then I had to do some troubleshooting (I can't remember exactly what) where I turned output_buffering=Off in my php.ini file. After

Re: How can I install xdebug?

2013-08-24 Thread kdubya
First of all, this isn't really a CakePHP question, is it? You might get better help at http://www.apachefriends.org/f/search.php?keywords=xdebug That said... I have been using Xdebug on Windows machines for years as part of my Netbeans IDE. I have it configured on both XP and Win 7 boxes. >F

Xdebug/Netbeans with CakePHP 2.3.5

2013-06-12 Thread kdubya
I have been using Netbeans 7.1/Xdebug 2.0.5/Apache 2.2 with CakePHP 1.3 on Windows (XP and 7) for years. It's a lovely way to debug. I am now trying to upgrade to CakePHP 2.3.5 and I cannot get Xdebug to work properly. With a clean install of CakePHP 2.3.5 I get the typical CakePHP Home page th

Re: Trouble using upgrade shell

2013-05-17 Thread kdubya
I should have said that index() does indeed exist in PagesController.php. Ken -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe fro

Trouble using upgrade shell

2013-05-17 Thread kdubya
I think it is great that the CakePHP team created the Upgrade Shell. However, I'm having trouble using it. I have a working 1.3 app that I want to upgrade to the latest version of CakePHP (2.3.5 at this time). I am doing this on a Windows 7 PC running Apache 2.2. I went to the Cookbook and foun

Re: What happeened to the API Documentation on CakePHP.org?

2013-03-02 Thread kdubya
Yes, I second jodator. Great Job!! -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from

Re: What happeened to the API Documentation on CakePHP.org?

2013-02-27 Thread kdubya
found it quite good. > > Here is 1.3 debugger: http://api.cakephp.org/1.3/class-Debugger.html > > I've found it by using the search box (it has a very nice autocomplete). > > Just remember to choose CakePHP version. > > > On Tuesday, February 26, 2013 7:52:10 PM UTC+1, kduby

Re: What happeened to the API Documentation on CakePHP.org?

2013-02-26 Thread kdubya
) to the left there is a structure that makes some sense. Debugger is found under Utilities. Not so under 1.3. Is there still some work going on here that the structure is not complete? Ken On Tuesday, February 26, 2013 1:26:43 PM UTC-5, kdubya wrote: > > I can't find the classes any

What happeened to the API Documentation on CakePHP.org?

2013-02-26 Thread kdubya
I can't find the classes anymore. I was specifically looking for the Debugger class in 1.3. The structure that used to be there until recently is gone. What happened? Did I miss something? Ken -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP

Re: The length parameter is not working for some input fields

2012-05-15 Thread kdubya
Daniel, Check your HTML 4 spec. The attribute you want is maxlength (not length). I have made the same mistake before :-) Ken -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others w

Re: who can tell me what the Make is.

2012-05-04 Thread kdubya
Try looking at http://en.wikipedia.org/wiki/Make_%28software%29 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this g

Re: SQL sum function to store as single variable

2012-04-22 Thread kdubya
Your SQL syntax in incorrect. Try: SELECT SUM(customerpurchases.amount) AS total From customerpurchases WHERE customerbill_id = $billid This can be written as a find(): $total = $this->CustomerPurchases->find('first', array('conditions'=>array('customerbill_id'=>$billid), 'fields'=>array('sum(

Re: Redirect www to non-www

2012-04-13 Thread kdubya
I realized I answered only part of your question. I have done the opposite of what you are asking - redirecting domain.tld -> www.domain.tld (making the www.domain.tld the canonical URL). The /site/.htaccess file I use contains: RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com

Re: Redirect www to non-www

2012-04-13 Thread kdubya
I have always made rewrite rule changes in the /site/.htacess file exclusively. I don't really know why the /site/app/.htaccess (or for that matter /site/app/webroot/.htaccess) files exist. I can't even dream up a scenario where those files would ever be applied - as long as the /site/.htacces

Re: Where to start?

2012-04-08 Thread kdubya
Start with the Blog tutorial. Follow it step-by-step. http://book.cakephp.org/2.0/en/tutorials-and-examples/blog/blog.html On Sunday, April 8, 2012 8:02:47 AM UTC-4, masoodi wrote: > > Dear friends , > >I am new to cake . I have installed it .Now after installation what > shall be our fi

Re: Error: Index.phpController could not be found

2012-02-22 Thread kdubya
What was the URL you used when you got this error message? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group,

Re: Controller/View and Model it is not working

2012-02-21 Thread kdubya
Your DocumentRoot should be the same directory where app is i.e. C:/www/tamilpadamdev This is the root of your application Your controller file should be named: actordesctbls_controller.php Also, in app/config/core.php you should probably change (if you have not already) from: Configure::write('

Re: View magic similar to form automagic

2012-02-12 Thread kdubya
Thank you, your suggestion was helpful regarding joins. Ken -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group

Re: View magic similar to form automagic

2012-02-12 Thread kdubya
Actually, the more I think about this I realize this cannot be done with some magic in the view. I'll have to do it in the controller or the model. Never mind. However, any suggestions of the best way to do this in the model or controller would be appreciated. I can think of a SQL query using a JO

View magic similar to form automagic

2012-02-12 Thread kdubya
In section 7.3.3 of the manual, it talks about form automagic that is really cool and simplifies forms greatly. Specifically I'm talking about, the example of, in the controller doing: $this->set('groups', $this->User->Group->find('list')); and then in the form: echo $this->Form->input('Gr

Re: Using CakePHP for the first time

2011-06-04 Thread kdubya
Oops, that should have been DocumentRoot in the https.conf file. Sorry for the typo. Ken -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. T

Re: Using CakePHP for the first time

2011-06-04 Thread kdubya
In the error message you gave, it looks like you entered the address of the view file (home.ctp) directly - this is incorrect for an application built with CakePHP. It should have been something like: http://localhost//home Note: there is no .ctp extension. CakePHP knows where to find the .ctp fil

Re: Radio Group Label

2011-05-14 Thread kdubya
Instead of using 'label'=>'Opt,' - try 'legend'=>'Opt.' -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, s

Re: Radio Group Label

2011-05-14 Thread kdubya
Would you post the HTML that your statement generates? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, sen

Re: Is there a maximum depth of reference for $this->Form->input()?

2011-03-17 Thread kdubya
Looks like your forgot the echo in front of the call to $this->Form- >input("ShooterEvent.$we.ShooterOption.$wo.entryfee", $optbab); -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help other

Re: CakePHP form validation before sending post to the requested controller function

2011-02-27 Thread kdubya
Oops, I neglected to say the your create() needs to change: echo $this->Form->create('Plan', array('action' => 'search_form')); instead of: echo $this->Form->create('Plan', array('action' => 'search')); On Feb

Re: CakePHP form validation before sending post to the requested controller function

2011-02-27 Thread kdubya
Sorry, you are absolutely right, redirecting causes the validation error messages to be lost. So, reverse the logic. You currently have a view that renders the form that collects the search criteria (you don't say what this is but I'll call it search_form as I did above). So there is an action and

Re: Advanced Form, use Form Helper?

2011-02-26 Thread kdubya
What "extra parameters"? Post a bit code showing how you use the date picker without CakePHP and we may be able to suggest how to do it using the $form->input() method. Ken -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions

Re: CakePHP form validation before sending post to the requested controller function

2011-02-26 Thread kdubya
So, in your search() action, call the validates() method as show in the book here: http://book.cakephp.org/view/3/The-Manual#!/view/410/Validating-Data-from-the-Controller Something like: if ($this->Plan->validates()) { // continue to show your search results view } else { // didn'

Re: Media Plugin - Newbie Questions

2011-02-21 Thread kdubya
I don't know anything about the Media plugin, however your problem may be with how you have created your inputs in the view. Have you looked at the structure of $this->data once the form has been submitted to your action (admin_add)? In order for saveAll() to work. It should look something like: a

Re: adding a new link and view to a cakephp websites

2011-02-21 Thread kdubya
Based on the (very small) snippet of code you posted, the view should be placed in the /app/views/committees directory and the file should be named setpages.ctp. The layout will have the $content_for_layout in it. Look in /app/views/ layouts. It may be a file called default.ctp (but maybe not). Wh

Re: configuration values in database?

2011-02-20 Thread kdubya
My suggestion would be to create a Model (maybe called Configuration with a DB table called configurations) for your configuration data then add the Model to your app_controller ($uses = array('Configuration');) so that it is available in all controllers. Depending on what you want to do with he co

Re: having trouble with post on inherited cake project

2011-02-19 Thread kdubya
Thomas, Please show us a bit more of the code surrounding the snippet with the checkbox. Also, what do you mean by "it hoses everything up?" Do you get error messages? It appears the original code snippet you show was in a loop. Why do you want to get rid of the loop? Ken -- Our newest site fo

Re: File upload issues

2011-02-07 Thread kdubya
Show us your view code that builds the form. Ken -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send ema

Re: Select Box - Table or Tinyint?

2011-01-25 Thread kdubya
@euromark - what a cool solution. I struggles with this same question and I think you hit on a great alternative. Ken On Jan 24, 7:27 pm, euromark wrote: > you might wanna > try:http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-at... > > On 25 Jan., 00:11, cricket wrote: > > >

Re: Problem with saveAll() not saving related model

2011-01-19 Thread kdubya
So, to summarize, I can either use saveAll() to 1) save a single record of the main model (in this case Item) WITH it's related models (see note below) - OR - 2) save multiple instances of the main model (Item) WITHOUT it's related models (see note below) - BUT - Not both. Is this correct? No

Problem with saveAll() not saving related model

2011-01-17 Thread kdubya
I realize I'm not the first person to have a problem with saveAll(). I have searched this group for a solution to my problem, which is - I can't get saveAll() to save related model data. I must be doing something wrong but I cannot spot it. My app is a sales/inventory system. Here are the pertinen

Re: Designing a form builder - Ideas

2010-02-07 Thread kdubya
Paul, I, for one, don't understand what you are trying to do. Why is the "user" selecting a textbox? Is this an end user/ Or is it a client- type user (someone building their website)? You say this is your first time using CakePHP so the following might be of help: In CakePHP much on the drudger

Re: Can I add a non database filed to the model?

2010-01-24 Thread kdubya
On Jan 23, 4:23 pm, ZAky wrote: > In registration form I want to add "confirm password" filed. > I don't have this filed in my users table. Why would you add it to your model? You probably don't want to save it, but instead compare it to the password field to make sure they are the same. Assumin

Re: i have three queries

2009-12-26 Thread kdubya
> 3. What is cakephp global variable for current web root url for example if > my cake  is running in subfolder called cake inside htdocs of XAMPP and i > use to access the site withhttp://localhost/cake/ > > what variable can return "http://localhost/cake/"; > I think you want $this->webroot I h

Re: How to hide/show links in view /default.ctp/ for different types of user group

2009-12-26 Thread kdubya
I do a similar thing but I an using the Auth component without ACL. However, I have added a 'role' field to my users table so I can select actions based on the user's role like you desire. In my controller I have the following: class PagesController extends AppController { public $name =

Re: Help with Redirect

2009-12-18 Thread kdubya
d'] ) Notice that there are no array keys assigned to the to arguments following the edit action. And, the definition for the edit() function should be something like: function edit($compatible_id, $product_id)... Study the way the function $html->link() is called here: http://b

Re: Help with Redirect

2009-12-18 Thread kdubya
> $compatible['Compatible']['id'], 'product_id' => $product['Product']['id']))?> Ken On Dec 18, 4:13 pm, Dewayne Pinion wrote: > On Fri, Dec 18, 2009 at 12:13 PM, kdubya wrote: > > Try either: > > $this->redirect(array

Re: Help with Redirect

2009-12-18 Thread kdubya
On Dec 17, 3:30 pm, Dewayne Pinion wrote: > Ok, apparently I am braindead, because I am still not grasping the concept > of a redirect in cake. I have this page: > >    productsadmin/compatibles/index/product_id:3365 Where does the above syntax come from (specifically the "product:3365" part)? Ty

Re: Open action in popup

2009-12-17 Thread kdubya
@Mohamed Thank you for your suggestions. However, in both your examples, the form is not actually submitted (unless I am missing something). I need the form to be submitted (hence calling the action) and the result of that action be rendered in a popup. I have tried a similar approach where instea

Open action in popup

2009-12-16 Thread kdubya
I have an application where I want a "printer friendly" rendering. My print() action has it's own layout. The action is called from a form (method=POST). I need all the input from the form to generate the stuff to be printed. How do I get the resulting stuff to be rendered in a popup window instead

Re: Share Javascripts and CSSs in various layouts

2009-12-12 Thread kdubya
Why don't you just use the standard helpers? i.e. In each of your layouts use the html and javascript helpers to include the .css and .js files you need, like below: app/views/layouts/layout_x.ctp ... css('common_css_file')?> link('common_js_file', true)?> ... ... The CSS file must be

Re: captcha with cakephp

2009-12-12 Thread kdubya
There is an excellent article in the Bakery at the following link: http://bakery.cakephp.org/articles/view/captcha-component-with-securimage It is not implemented using jQuery but it is a complete, step-by-step guide to implementing CAPTCHA in CakePHP. I followed the instructions and had it up and

Re: CakephpController could not be found

2009-12-06 Thread kdubya
The message you are getting is telling you that you have not setup any kind of app under CakePHP. The URL you provided in your post (http:// localhost/cakephp/) is not a proper URL to access a CakePHP app. If you follow the suggested installation (see http://book.cakephp.org/view/329/Getting-Cake)

Re: Where do I begin

2009-12-05 Thread kdubya
What control panel? CakePHP has no "control panel." If you are thinking CakePHP is something like Front Page, that is not how it is at all. The CakePHP interface is an API (Application Programing Interface) and you need to write PHP code to use it. Do you know anything about programming in PHP? You

Re: Table join confusion...

2009-11-20 Thread kdubya
Dr. Lobato, Thank you. I don't know why I didn't find this article on the bakery but it looks just what I need. Your example code is very clear. I'll try it today. Ken On Nov 18, 10:51 pm, "Dr. Loboto" wrote: > http://bakery.cakephp.org/articles/view/quick-tip-doing-ad-hoc-joins-... -- You r

Re: Table join confusion...

2009-11-18 Thread kdubya
On Nov 7, 2:35 pm, Thiago Nuic Vidigal wrote: > You can include other tables in the query using the 'joins' option of the > Model->find method. > This sound like the solution to a problem I am trying to solve but I have looked in the Manual and can find almost nothing about "joins" option to "fin

Re: Strange belongsTo problem

2009-10-27 Thread kdubya
@sersilva - I have just tried your suggestion and it DOES prevent the weird output (crash?) I was getting. However, there must still be some things I don't understand about these belongsTo relationships: 1) I do remember something in the CookBook about making relationship alias names unique but

Re: Strange belongsTo problem

2009-10-27 Thread kdubya
On Oct 27, 4:08 pm, John Andersen wrote: > I am not sure, but should the hasMany, hasOne not be arrays, thus: Not according to the book here: http://book.cakephp.org/view/81/belongsTo Ken --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Strange belongsTo problem

2009-10-27 Thread kdubya
e_id' >                ); > == > > sersilva > > 2009/10/27 kdubya : > > > > > Well, (this is me looking doubly sheepish) the reason it worked after > > rebooting was I had not put back the DisplayAreabelongsToPage &

Re: Strange belongsTo problem

2009-10-27 Thread kdubya
On Oct 27, 3:37 pm, John Andersen wrote: > Please copy/paste the actual model associations from each model, so > that we may better be able to help you ;) > Enjoy, >John from page.php class Page extends AppModel { public $name = 'Page'; public $validate = array( 'title' => array('n

Re: Strange belongsTo problem

2009-10-27 Thread kdubya
More info. With all belongsTo associations in place (per original post) find() works ONLY if I set recursive LESS than the maximum depth from that level. So $this->Page->recursive = 2; $page = $this->Page->find('first', array('conditions'=>array('title like'=>'%Home%'))); works OK but the Image

Re: Strange belongsTo problem

2009-10-27 Thread kdubya
Well, (this is me looking doubly sheepish) the reason it worked after rebooting was I had not put back the DisplayArea belongsTo Page association. So the original symptoms still exist but it is interesting that I get the same symptoms when recursive is set too deep. I'm still stumped. Ken --~--

Re: Strange belongsTo problem

2009-10-27 Thread kdubya
Well, (this is me looking a bit sheepish) it seems like it was a corrupted environment on my development PC. The problem, in one instance, went away after rebooting. In another instance, I was attempting to do a find of ContentBlock where I had defined recursive =2 which put it past the end of the

Strange belongsTo problem

2009-10-27 Thread kdubya
I have a simple hierarchy like this: Page hasMany DisplayArea DisplayArea hasMany ContentBlock ContentBlock hasOne Image All is fine when I execute queries with the above associations e.g. $this->Page->find('first', array('conditions'=>array('title like'=>'%Home%'))); Now I want to access some

Re: Where to put function needed in multiple models?

2009-09-23 Thread kdubya
Jon, OK, I got it working as a behavior. I had to make 3 changes from your suggestion to get it to work: 1) The actAs declaration had to be: var $actsAs = array('Cleanup'=>array('field1'=>'', 'field2'=>'')); // i.e. empty options value for each field (Actually, since I'm not using any options,

Re: Where to put function needed in multiple models?

2009-09-23 Thread kdubya
Jon, On Sep 22, 6:27 pm, Jon Bennett wrote: > Hi kdubya, > > Sounds like a perfect candidate for a behaviour to me. I had attempted to go down this behavior path but it seemed much more complicated than necessary. Your example looks pretty complete so I'll give it a try (m

Re: Where to put function needed in multiple models?

2009-09-22 Thread kdubya
Thank you, Brian. Sounds like an excellent suggestion! (Why didn't I think of that?) On Sep 22, 4:54 pm, brian wrote: > If calling from beforeSave(), the best place might be AppModel. If you > don't already have one of those, copy the file at > cake/libs/models/app_model.php to your app director

Where to put function needed in multiple models?

2009-09-22 Thread kdubya
I'm trying to follow the structure of CakePHP but I don't know where to put a utility function that I would like to call to filter certain fields in more than one Model. The utility function filters most HTML tags, but allows some safe ones like etc. and replaces newlines with . I want to call

Re: related to Session->setFlash

2009-08-20 Thread kdubya
On Aug 19, 9:01 am, zaboo wrote: > Don't echo $this->Session->setFlash() > > On Aug 19, 8:27 am, Chander Bhan wrote: > > > I always get the digit 1 in the next line of the message sent through > > Session->setFlash from controller, need help I don't understand this answer. I have been having th

Re: Makes no sense

2009-06-22 Thread kdubya
Dave, Keep in mind that Paginate is like doing a $this->Model->find(). The options setup in the $paginate variable in the controller are setting up the arguments to a find-like SQL query on your database. Every time a new page is requested (by the user clicking on the next page link) causes a new

Re: Array Help

2009-06-22 Thread kdubya
Try something like this (assuming the two arrays you mentioned are called $id and $percent respectively): $combined = array(); foreach ($id as $key=>$value) { $combined[$key] = array('id'=>$value), 'percent'=>$percent[$key]); } --~--~-~--~~~---~--~~ You received

Re: who is 'Cake' : some basic oop cake nonunderstanding

2009-06-21 Thread kdubya
Yes, CakePHP explanations can be terse. However, there is a description of how a CakePHP app gets started in section one of the manual (see: http://book.cakephp.org/view/10/Understanding-Model-View-Controller). > 1. Where are the objects ?? > I see lots of classes but no instances of them.Yes, t

What debug/IDE do you use?

2009-06-19 Thread kdubya
What development environment/debugger do you use when developing CakePHP apps? Have you used others? What do like/dislike about the one you use? Ken --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To

Getting Xdebug to work under CakePHP 1.2 and NetBeans 6.5

2009-06-15 Thread kdubya
I have recently switched from a plain text development style to using NetBeans 6.5. I figured I might like some of the niceties of a real IDE (I have used them before) but my main motivation was to get debugging with breakpoints, watches etc. So, I have gotten Xdebug (verision 2.0.4) to work with