Intermittently no-response to ajax request

2007-07-19 Thread cdomigan
Greetings! I'm having an intermittent problem (ie very difficult to debug :-) with CakePHP seemingly not returning anything in response to a request. My app is largely ajax-driven. About 1 in 20 times, when an ajax request is made there is no response received from the server, and Firebug just d

Re: AuthComponent Tutorial

2007-07-19 Thread R. Rajesh Jeba Anbiah
On Jul 20, 5:30 am, "Geoff Ford" <[EMAIL PROTECTED]> wrote: > Thanks R. Rajesh Jeba Anbiah for adding me to the Frequent Discussions page > (in a couple of places). :D You're welcome:-) You're also welcome to improve it; it's just a wiki. -- Email: rrjanbiah-at-Y!comBlog: http://rajesh

Calling stored procedures

2007-07-19 Thread Martin Schapendonk
Hi, What would be a nice way to call stored procedures and capture their output/return value from CakePHP? Regards, Martin -- Martin Schapendonk, [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: need advice on controller undefined actions

2007-07-19 Thread Geoff Ford
Not sure why the routes are doing that - I have done similar in 1.1 that worked. Here is what I have used in a non-cake app before function index($param = null){ if ($param && method_exists($this, $param) { call_user_function(array($this, $param)); } else { // do normal action } }

need advice on controller undefined actions

2007-07-19 Thread hks
I've got a default action, index, that gets a list of names starting with an alphabet. The parameter defaults to 'A' eg http://some.com/controller/ will list all names starting with letter A http://some.com/controller/index/E will list those starting with letter E Now i would like http://some.c

Re: AuthComponent Tutorial

2007-07-19 Thread Geoff Ford
Thanks R. Rajesh Jeba Anbiah for adding me to the Frequent Discussions page (in a couple of places). :D Geoff On 7/19/07, francky06l < [EMAIL PROTECTED]> wrote: > > > Just forgot obe thing for the password when using another fieldname > (avoid the hash). Before saving the record you should hash t

Re: Session error in cake-php

2007-07-19 Thread Christopher E. Franklin, Sr.
I have a problem sort of like this. I wonder if upgrading would fix it. Every once in a while, I will get a session error if I leave the page open too long and then try to navigate to another page. I am presuming, the amount of time that I have to be idle is dependant upon the security settings

Re: SOLVED: Cake with Sub Domains on Dreamhost

2007-07-19 Thread Christopher E. Franklin, Sr.
Ah, that is a good way too! Personally, I thought it was easier to understand my way but, I may be wrong. It's only easy when you know it :) On Jul 19, 4:09 pm, "Jon Bennett" <[EMAIL PROTECTED]> wrote: > On 7/19/07, Jon Bennett <[EMAIL PROTECTED]> wrote: > > > > > On 7/19/07, Jon Bennett <[EMAI

Re: forum integration best practice (SMF)

2007-07-19 Thread Geoff Ford
Cake is flexible enough that your user model can use a db table not called users. Use var $useTable = 'smf_users'; You may have to set up all the associations manually etc. but I think that while seperate tables might appear easier to start with, it will introduce sync errors and data redundancy

1.2: Date mangled by $this->cleanUpFields on form error

2007-07-19 Thread [EMAIL PROTECTED]
Before I go through the trouble of filing a ticket on this one, maybe somebody can look over what I'm doing and tell me if it's a problem of my own doing. I've got the normal date field setup in a Controller::add : input('Controller.date', array('label' => 'Date field', 'empty' => true))?> When

Re: SOLVED: Cake with Sub Domains on Dreamhost

2007-07-19 Thread Jon Bennett
On 7/19/07, Jon Bennett <[EMAIL PROTECTED]> wrote: > On 7/19/07, Jon Bennett <[EMAIL PROTECTED]> wrote: > > > Line 43 define('ROOT', '/home/username/domain.com'); > > > > > > Line 56 define('CAKE_CORE_INCLUDE_PATH', '/home/username'); (Notice > > > 'cake' was left off of the end) > > > > > > -

Re: Session error in cake-php

2007-07-19 Thread Geoff Ford
I had this problem on PHP 5.1 on Debian Sarge. I had to upgrade to 5.2 to solve it. Otherwise it is a permissions problem. Geoff -- http://lemoncake.wordpress.com On Jul 19, 11:26 pm, francky06l <[EMAIL PROTECTED]> wrote: > Seems related to authorization on your temp directory (session files >

Re: Date format with $form->input

2007-07-19 Thread Geoff Ford
It is possible, you misread what speccy was saying. Use what you have and add a dateFormat key in the options array like input('User.birthday', array('type' => 'date', 'label' => 'Birthday', 'empty' => true, 'minYear' => date('Y')-60, 'maxYear' => date('Y')-15, 'dateFormat' => 'DMY')); ?> Also

Re: Doccumentation

2007-07-19 Thread Grant Cox
https://trac.cakephp.org/ Post as a documentation ticket. On Jul 20, 5:07 am, mussond <[EMAIL PROTECTED]> wrote: > Hey all, I know its been said before, well at least i've seen it a > couple of times. The documentation isn't detailed. > > I recall someone saying that there needs to be more new

Re: Doccumentation

2007-07-19 Thread Geoff Ford
https://trac.cakephp.org/ is the place, there is a section on Documentation Efforts which describes your options. There is a huge push on the manual for the upcoming release of 1.2 atm, which you can preview in SVN I believe, although I haven't had time to check it out yet. Good to see that your

Re: Using activity indicator with pagination component.

2007-07-19 Thread Geoff Ford
This might be of use. http://aka-fotos.de/protoload/ It puts an overlay with a loading image over almost any dom element ( example 3 has issues in IE) Geoff -- http://lemoncake.wordpress.com On Jul 20, 7:29 am, francky06l <[EMAIL PROTECTED]> wrote: > pay attention at the first part there : > >

Redirecting

2007-07-19 Thread mussond
I'm stuck on redirecting. I'm getting a internal server error. The idea is when I submit the form it will redirect from data_points/ index to data_points/report/$id_user. Where $id_user is a id that the user selected from an combo box. Here is part of my controller code that is detecting the s

Re: db table design

2007-07-19 Thread Felix Geisendörfer
> > @Felix, yes you right for cake 1.2, sorry Nothing to be sorry about ; ). But why am I right for 1.2 only? I suggest using an id field join tables, even if it's not a PHP app ^^. -- Felix -- My Blog: http://www.thinkingphp.org My Business: http://www.fg-webdesign.de f

Re: db table design

2007-07-19 Thread francky06l
@Felix, yes you right for cake 1.2, sorry On Jul 19, 4:24 pm, Felix Geisendörfer <[EMAIL PROTECTED]> wrote: > > The primary key is the combination of the 2 fields. > > Don't do that. Give it an id. It will make your life *much* easier. It > will allow you to create a model for you join table and

Re: Using activity indicator with pagination component.

2007-07-19 Thread francky06l
pay attention at the first part there : http://groups.google.com/group/cake-php/browse_thread/thread/f990a45967935665/d45ee41f79f69031?lnk=gst&q=pagination+categories&rnum=1#d45ee41f79f69031 On Jul 19, 10:37 pm, "Christopher E. Franklin, Sr." <[EMAIL PROTECTED]> wrote: > Dang... no country music

Re: How to save data to a model calling the save method from another controller

2007-07-19 Thread francky06l
Well I have used it, never had problem ..Another solution is to $uses = array('Model1', 'Model2') then $this->Model2->save($this->data) ... I really do not know what would change using this ... On Jul 19, 5:04 pm, Spectacularium <[EMAIL PROTECTED]> wrote: > I read somewhere here about people hav

Re: $this->cakeError refuses to load a custom layout.

2007-07-19 Thread francky06l
Sorry guys did not know "errors always use the default layouts". On Jul 18, 12:00 am, phpjoy <[EMAIL PROTECTED]> wrote: > that's great to know, "errors always use the default layouts". :) > didn't see it in the manual.. > > thanks a tons for the solution. > > On Jul 16, 7:52 pm, rtconner <[EMAIL

Re: SOLVED: Cake with Sub Domains on Dreamhost

2007-07-19 Thread Jon Bennett
On 7/19/07, Jon Bennett <[EMAIL PROTECTED]> wrote: > > Line 43 define('ROOT', '/home/username/domain.com'); > > > > Line 56 define('CAKE_CORE_INCLUDE_PATH', '/home/username'); (Notice > > 'cake' was left off of the end) > > > > - > > Do the same thing for the sub.domain.com and cha

Re: SOLVED: Cake with Sub Domains on Dreamhost

2007-07-19 Thread Jon Bennett
> Line 43 define('ROOT', '/home/username/domain.com'); > > Line 56 define('CAKE_CORE_INCLUDE_PATH', '/home/username'); (Notice > 'cake' was left off of the end) > > - > Do the same thing for the sub.domain.com and change all of the > domain.com to sub.domain.com I do this slightly

Re: Using activity indicator with pagination component.

2007-07-19 Thread Christopher E. Franklin, Sr.
Dang... no country music. On Jul 19, 12:53 pm, Tazz <[EMAIL PROTECTED]> wrote: > Hi, I implemented the pagination component and got it working with > AJAX. > > Now I want to add an activity indicator when I click the next and > previous links. > > Anyone done this? > > On a side note this is the

Re: New to Cake

2007-07-19 Thread Samuel DeVore
also some php5 installs do not have the mysql connectors installed by default, have you verified that you can connect to the mysql db using just plain php? http://us.php.net/mysql Sam D On 7/19/07, Erich C. Beyrent <[EMAIL PROTECTED]> wrote: > > Can you connect to the database via the console usi

Using activity indicator with pagination component.

2007-07-19 Thread Tazz
Hi, I implemented the pagination component and got it working with AJAX. Now I want to add an activity indicator when I click the next and previous links. Anyone done this? On a side note this is the site I'm currently working on and using Cake PHP. http://www.inbeatstore.com/ Thanks --~--~

Re: New to Cake

2007-07-19 Thread Erich C. Beyrent
Can you connect to the database via the console using that username and password? Did you add permissions to the database for that user? -Erich- Chris Hartjes wrote: > On 7/19/07, Bob <[EMAIL PROTECTED]> wrote: >> Thank you. >> >> Tried that. Same result, same errors. >> >> Bob > > Well, I'm p

Re: Why does $form->:input("id") set the field as hidden?

2007-07-19 Thread gmarziou
> Try input('id', array('type'=>'text');?> Thanks, it worked. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from th

Re: Putting a "table" in a scrollable box so to speak

2007-07-19 Thread Pablo Viojo
Don't try, doesn't work in IE ;) (i've tried it before)[1] Pablo Viojo [1] http://www.google.com/search?q=scroll+tbody+ie On 7/19/07, Tane Piper <[EMAIL PROTECTED]> wrote: > > > I've not tried this myself, but if its a table, make sure you have a > and , then in CSS do: > > tbody { overflow: sc

SOLVED: Cake with Sub Domains on Dreamhost

2007-07-19 Thread Christopher E. Franklin, Sr.
LOL Looks like you posted while I was writing mine. Looking at your article, it looks a lot different from my layout. The way I have things now, does it look like it might break later? Luckily this setup, I did not have to modify any cake files, so I should be fine with adding more subdomains a

SOLVED: Cake with Sub Domains on Dreamhost

2007-07-19 Thread Christopher E. Franklin, Sr.
Woot, it is now solved. I don't know why but, for some reason, I had to leave off the trailing "cake" on the end of the define('CAKE_CORE_INCLUDE_PATH', '/home/username');. All in all, this is now my directory structure: /home/username /cake /vendors

Re: Cake with Sub Domains on Dreamhost

2007-07-19 Thread AD7six
On Jul 19, 8:46 pm, "Christopher E. Franklin, Sr." <[EMAIL PROTECTED]> wrote: > I will try that next. I think I am making some headway here. This is > what I have changed so far in the domain.com/app/index.php and the > domain.com/app/webroot/index.php > > define('CAKE_CORE_INCLUDE_PATH', '/ho

Doccumentation

2007-07-19 Thread mussond
Hey all, I know its been said before, well at least i've seen it a couple of times. The documentation isn't detailed. I recall someone saying that there needs to be more newbie input about whats lacking and things wrote and added. What I can't remember is if there is a place to post suggestions

Re: Putting a "table" in a scrollable box so to speak

2007-07-19 Thread Tane Piper
I've not tried this myself, but if its a table, make sure you have a and , then in CSS do: tbody { overflow: scroll; } May work for you On 7/11/07, Ketan Patel <[EMAIL PROTECTED]> wrote: > > can be done with css. > > Put the following in the table > Company Name Contact Name

Re: Cake with Sub Domains on Dreamhost

2007-07-19 Thread Christopher E. Franklin, Sr.
I will try that next. I think I am making some headway here. This is what I have changed so far in the domain.com/app/index.php and the domain.com/app/webroot/index.php define('CAKE_CORE_INCLUDE_PATH', '/home/username'); This seems to work and now my app can find my cake directory in /home/ us

Re: Cake with Sub Domains on Dreamhost

2007-07-19 Thread Pablo Viojo
>From the folder structure you present i think you should define: define('CAKE_CORE_INCLUDE_PATH', DS.'home'.DS.'username'.DS.'domain.com '.DS.'cake') as long as /domain.con/cake is "normally" set at /home/.target/username/domain.com/cake Even you could set cake on a folder that's not accesible

Re: Putting a "table" in a scrollable box so to speak

2007-07-19 Thread Pablo Viojo
Depending on your table configuration it can be done if the table is simple enough, but if you use a separate div for the table contents, then you will have to set the widths for the columns, both on header and content, and can be very difficult to match them. Also if you want to scroll horizontall

Re: Cake with Sub Domains on Dreamhost

2007-07-19 Thread Feris Thia
On 7/20/07, Christopher E. Franklin, Sr. <[EMAIL PROTECTED]> wrote: > > Hi all, I have searched around for an answer to this but, none of the > posts I have found come close to my scenario. > I am using Dreamhost which allows me to make subdomains. These > subdomains are represented as different

Re: New to Cake

2007-07-19 Thread Pablo Viojo
Try installing someother app that uses db (could be wordpress) and check if it works correctly. If it doesn't then theres a problem with the comuunication between php and mysql. Pablo On 7/19/07, Bob <[EMAIL PROTECTED]> wrote: > > > I logged in to the DB using the user and pass, so I know it is

Re: New to Cake

2007-07-19 Thread Bob
I logged in to the DB using the user and pass, so I know it is correct. It matches what is in the database.PHP file. I took the IP address of the DB server and plugged it into database.PHP. I did not get the errors this time, but still can't connect to DB? Thanks On Jul 19, 12:57 pm, "Chris Har

Re: New to Cake

2007-07-19 Thread Vincent Fleuranceau
Hi, - Is MySQL accepting (socket) connections on localhost? - Does the /usr/local/mysql-5.0/data/mysql.sock file exist? See: http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html -- Vincent --~--~-~--~~~---~--~~ You received this message bec

forum integration best practice (SMF)

2007-07-19 Thread cakeFreak
Hey guys, I'm gonna have to integrate my forthcoming Cake project with a forum. First of all I just wanted to ask your opinion about the best practice to achieve it: 1) separated user tables (when 1 user registers with the Cake App it gets added to the forum user table and vice-versa) 2) single u

Re: New to Cake

2007-07-19 Thread Chris Hartjes
On 7/19/07, Bob <[EMAIL PROTECTED]> wrote: > > Thank you. > > Tried that. Same result, same errors. > > Bob Well, I'm pretty sure that when PHP is saying that it can't connect to the database server, it's being honest. I would triple check that the username and password you are using are correct

Re: New to Cake

2007-07-19 Thread Bob
Thank you. Tried that. Same result, same errors. Bob On Jul 19, 12:47 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 7/19/07, Bob <[EMAIL PROTECTED]> wrote: > > > > > 127.0.0.1? please explain. > > thanks > > 127.0.0.1 is an IP address that usually represents your local machine. > > -- > C

Re: New to Cake

2007-07-19 Thread Chris Hartjes
On 7/19/07, Bob <[EMAIL PROTECTED]> wrote: > > 127.0.0.1? please explain. > thanks 127.0.0.1 is an IP address that usually represents your local machine. -- Chris Hartjes Senior Developer Cake Development Corporation My motto for 2007: "Just build it, damnit!" @TheBallpark - http://www.littl

Re: New to Cake

2007-07-19 Thread John David Anderson (_psychic_)
On Jul 19, 2007, at 11:42 AM, Bob wrote: > > 127.0.0.1? please explain. Instead of 'host' => 'localhost' do 'host' => '127.0.0.1' -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To po

Re: New to Cake

2007-07-19 Thread Bob
127.0.0.1? please explain. thanks On Jul 19, 12:31 pm, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Jul 19, 2007, at 11:28 AM, Bob wrote: > > > > > yes, here it is. > > > class DATABASE_CONFIG > > { > >var $default = array('driver' => 'mysql', > >

Re: Date format with $form->input

2007-07-19 Thread Braindead
I want to use $form->input with the type set to 'date'. The advantage is, that it generates the select fields AND a label for the fields. $form->dateTime does not generate the label. My problem is, that I want to change the dateFormat to DMY. But I think this is not possible, because the dateForm

Re: New to Cake

2007-07-19 Thread John David Anderson (_psychic_)
On Jul 19, 2007, at 11:28 AM, Bob wrote: > > yes, here it is. > > class DATABASE_CONFIG > { > var $default = array('driver' => 'mysql', > 'connect' => > 'mysql_connect', >

Re: New to Cake

2007-07-19 Thread Bob
you are correct! On Jul 19, 12:30 pm, "Christopher E. Franklin, Sr." <[EMAIL PROTECTED]> wrote: > You should not include your password :) > > On Jul 19, 10:28 am, Bob <[EMAIL PROTECTED]> wrote: > > > > > yes, here it is. > > > class DATABASE_CONFIG > > { > > var $default = array('driver'

Re: New to Cake

2007-07-19 Thread Christopher E. Franklin, Sr.
You should not include your password :) On Jul 19, 10:28 am, Bob <[EMAIL PROTECTED]> wrote: > yes, here it is. > > class DATABASE_CONFIG > { > var $default = array('driver' => 'mysql', > 'connect' => > 'mysql_connect', >

Re: New to Cake

2007-07-19 Thread Bob
yes, here it is. class DATABASE_CONFIG { var $default = array('driver' => 'mysql', 'connect' => 'mysql_connect', 'host' => 'localhost',

Cake with Sub Domains on Dreamhost

2007-07-19 Thread Christopher E. Franklin, Sr.
Hi all, I have searched around for an answer to this but, none of the posts I have found come close to my scenario. I am using Dreamhost which allows me to make subdomains. These subdomains are represented as different folders on the file system. So, I have, for example: /- -domain.com/ -sub.do

Re: New to Cake

2007-07-19 Thread rtconner
Did you config the configure/database.php file? On Jul 19, 10:43 am, Bob <[EMAIL PROTECTED]> wrote: > Thanks for the reply. > > I set up the database this morning and it is up and running, but still > unable to connect. > > Any other suggestions? > > On Jul 19, 11:37 am, "John David Anderson (_ps

Re: New to Cake

2007-07-19 Thread Bob
Thanks for the reply. I set up the database this morning and it is up and running, but still unable to connect. Any other suggestions? On Jul 19, 11:37 am, "John David Anderson (_psychic_)" <[EMAIL PROTECTED]> wrote: > On Jul 19, 2007, at 10:28 AM, Bob wrote: > > > > > I am attempting to start

Re: New to Cake

2007-07-19 Thread John David Anderson (_psychic_)
On Jul 19, 2007, at 10:28 AM, Bob wrote: > > I am attempting to start Cake for the first time. I get the following > errors when trying to open: > > Warning: mysql_connect(): Can't connect to local MySQL server through > socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/ > b/r/

New to Cake

2007-07-19 Thread Bob
I am attempting to start Cake for the first time. I get the following errors when trying to open: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) in /home/content/b/r/ o/brob3435594/html/cake/cake/libs/model/dbo/dbo_mysql.php

Re: RenderElement from within Helper

2007-07-19 Thread rtconner
Yeah thats the same thing AD7six suggested. Thanks guys. Just what I wanted. On Jul 19, 6:24 am, francky06l <[EMAIL PROTECTED]> wrote: > I just did this in my helper : > > class AttribHelper extends AppHelper > { > > function helpme() > { > $lview = Cl

Re: Best way to make controllers

2007-07-19 Thread Cacho
On Jul 19, 2:34 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > My personal opinion - one controller per 'type' of 'operation'. I > think all actions that can be performed on a single object (not > necessarily a single model) should be managed in the one controller. > Different permissions to those a

Use a model in a Fck Helper

2007-07-19 Thread [EMAIL PROTECTED]
Hi I have a question : I have made a plugin for FCK editor. Now I would use a function of a cake model in this plugin. have you any idea to do this? Many thanks Marco --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: circular references ? / mod_rewrite

2007-07-19 Thread jyrgen
Geoff, thanks for your response. My setup is this: webserver docroot / index.php then /app -config/ -models etc.. -webroot /cake (the core stuff) a standard installation. otherwise i would have mentioned. i have no access to httpd.conf, (shared environment) --~--~-~--~

Re: Date format with $form->input

2007-07-19 Thread Spectacularium
SEt an option called 'dateFormat' with one of the following values: 'DMY', 'MDY', 'YMD' or 'NONE'. For more information see the dateTime method in the Form helper [ http://api.cakephp.org/1.2/class_form_helper.html#363d9dcc25f7cd0624d3dc8f4254df34 ] On Jul 19, 3:22 pm, Braindead <[EMAIL PROTECT

Re: How to save data to a model calling the save method from another controller

2007-07-19 Thread Spectacularium
I read somewhere here about people having problems with the wrong ID being set when you have more then one model's information in the data. I didn't have time to check this out properly but to avoid it I use $this->Model1->Model2->save( $this->data['Model2'] ); Just thought you might find this

Re: db table design

2007-07-19 Thread Felix Geisendörfer
> > The primary key is the combination of the 2 fields. Don't do that. Give it an id. It will make your life *much* easier. It will allow you to create a model for you join table and easily model relationships

Re: db table design

2007-07-19 Thread Mithun Das
the primary key will be the combined fields user_id and module_id u dont have to create a separate id for that table. On 7/19/07, rtanz <[EMAIL PROTECTED]> wrote: > > > hi when i have a join table such as users_modules do i have to make a > separate id for the table itself or will the primary key

Date format with $form->input

2007-07-19 Thread Braindead
I'm using Cake 1.2 and want to display some selects for date input. This is my code: input('User.birthday', array('type' => 'date', 'label' => 'Birthday', 'empty' => true, 'minYear' => date('Y')-60, 'maxYear' => date('Y')-15)); ?> Is it possible to tell Cake to display the fields in DMY order in

Re: db table design

2007-07-19 Thread francky06l
The primary key is the combination of the 2 fields. On Jul 19, 3:54 pm, rtanz <[EMAIL PROTECTED]> wrote: > hi when i have a join table such as users_modules do i have to make a > separate id for the table itself or will the primary key be the > combined fields user_id and module_id? > > thanks

db table design

2007-07-19 Thread rtanz
hi when i have a join table such as users_modules do i have to make a separate id for the table itself or will the primary key be the combined fields user_id and module_id? thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: Create calendar component

2007-07-19 Thread francky06l
Well I did not see the startup function in the bin, besides the code is still a Controller and not a component. Maybe you should start by an "empty" component, that you test with a "test" controller .. the component should look like this (almost empty) : class CalendartComponent extends Object

Re: How to save data to a model calling the save method from another controller

2007-07-19 Thread francky06l
$this->Model1->Model2->save($this->data ... ) On Jul 19, 2:04 pm, Mithun <[EMAIL PROTECTED]> wrote: > I have two different models Model1 and Model2. Model1 is related as > hasMany with Model2.And Model2 belongsTo Model1. I want to save the > form data to the fields of Model2 calling a save action

Re: Session error in cake-php

2007-07-19 Thread francky06l
Seems related to authorization on your temp directory (session files are usually stored in the temp directory defined in Apache .. ). Check if you have the rights on this directory, use chmod to change it. On Jul 19, 2:53 pm, kashish <[EMAIL PROTECTED]> wrote: > Hi All, > > I am working in Cake-P

How to save data to a model calling the save method from another controller

2007-07-19 Thread Mithun
I have two different models Model1 and Model2. Model1 is related as hasMany with Model2.And Model2 belongsTo Model1. I want to save the form data to the fields of Model2 calling a save action from Model1. How to achieve it. I am using Cake's version : cake_1.1.15.5144 --~--~-~--~~---

Session error in cake-php

2007-07-19 Thread kashish
Hi All, I am working in Cake-PHP.I am sometime getting the following error when the session expires or when i try to logout. Notice: session_start() [function.session-start]: ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) in /home/cake/libs/session.php on line 154

Re: AuthComponent Tutorial

2007-07-19 Thread francky06l
Just forgot obe thing for the password when using another fieldname (avoid the hash). Before saving the record you should hash the password : $this->data['User']['password'] = $this->Auth->password($this- >data['User']['dummypassword']); $this->User->save($this->data); On Jul 19, 2:42 pm, G

Re: AuthComponent Tutorial

2007-07-19 Thread Geoff Ford
I just posted another article pushing this tutorial down the homepage. Here is the direct link http://lemoncake.wordpress.com/2007/07/19/using-authcomponent-and-acl-in-cakephp-12/ Geoff -- http://lemoncake.wordpress.com On Jul 19, 10:27 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > Hey Francky, >

Re: Best way to make controllers

2007-07-19 Thread Geoff Ford
My personal opinion - one controller per 'type' of 'operation'. I think all actions that can be performed on a single object (not necessarily a single model) should be managed in the one controller. Different permissions to those actions should be handled by ACL. I think different controllers fo

Re: AuthComponent Tutorial

2007-07-19 Thread Geoff Ford
Hey Francky, Thanks for the input. userScope - I haven't used it past the user model, could be a problem when disabling groups...hmmm hashPassword - excellent tip. Thank you for that Role checking - see the latest post on my blog called Acl with Groups (just finished writing it) It shows how

Re: RenderElement from within Helper

2007-07-19 Thread francky06l
I just did this in my helper : class AttribHelper extends AppHelper { function helpme() { $lview = ClassRegistry::getObject('view'); $lview->renderElement('myelement'); . On Jul 19, 8:25 am, AD7six <[EMAIL PROTECTED]>

Re: AuthComponent Tutorial

2007-07-19 Thread francky06l
Hey Geoff, great article. Just some details : userScope : - is used only if you use the login method (calling identify) of the Auth - the model->find of the identify function set the recursive flag to -1, so forbidden such userScope (in case of disabling a group, User belongsTo Group) :

Ajax update div, cakephp 1.2

2007-07-19 Thread Laburno
Hi all! Could someone explain to a total noob like me, what is the best method to simply update a div with ajax, using cake 1.2? I wish to have a link that call a search function and update a div with the results. Thank you --~--~-~--~~~---~--~~ You received this

Best way to make controllers

2007-07-19 Thread Cacho
Hi I wonder which is the best way to make controllers. Explaining: My site home page will show data from various model (products, categories, etc). When somebody click in product link I think it should be redirected to a product controller but I think there are many operations in that controlle

Re: paginator sort options

2007-07-19 Thread Spectacularium
I'm not sure if I understand you correctly but the sort method of the paginator helper will automatically figure out whether to sort asc or desc for you sort( 'id' ) ?> http://api.cakephp.org/1.2/class_paginator_helper.html#47126613be03a2453265670a2771900b On Jul 18, 4:38 pm, Mech7 <[EMAIL PRO

Re: Problem:when using more than one submit button in ajax helper's form

2007-07-19 Thread Spectacularium
Couldn't you give both buttons the same name and then check against the value? On Jul 19, 5:17 am, pravi <[EMAIL PROTECTED]> wrote: > echo $ajax- > > >form('editTest','',array('name'=>'editForm','update'=>'editBar')) ; > > ?> > > >

AuthComponent Tutorial

2007-07-19 Thread Geoff Ford
I have posted a tutorial on my blog about using the AuthComponet as promised. As always, feedback and suggestions encouraged. Also, is it good form to add your own articles to the Frequent Discussions page. There is an "How to use the 1.2's Auth component?" section that I think my post belongs

Re: circular references ? / mod_rewrite

2007-07-19 Thread Geoff Ford
What is your setup? What is your server docroot, where is your app folder located and where is the cake folder? I regularly have my development projects running as subfolders on my machine with no problems with rewrites. Problems with rewrites usually come from non-standard installs, dodgy apac

Re: Error con memcache

2007-07-19 Thread Grzegorz Pawlik
ke? :P Hi mate, i think the probability of getting answers to your problelm will grow if you post it in english. Cheers :) On Jul 18, 7:30 pm, citBolon <[EMAIL PROTECTED]> wrote: > Si alguno conoce el componente memcache probablemente me pueda ayudar. > El error que obtengo es el siguiente: > Fat

circular references ? / mod_rewrite

2007-07-19 Thread jyrgen
i'm having these kind of errors in apache.log mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary. Request exceeded the limit of 10 internal redirects due to probable configuration error.

How to cache the default startup page?

2007-07-19 Thread [EMAIL PROTECTED]
In my controller "Posts", I enabled the cache component for index and view actions. When i go to my website, the default controller/action are posts/index $Route->connect('/', array('controller' => 'Posts')); The problem is that only http://mywebsite.com/posts/index and http://mywebsite.com/pos

Re: Design questions

2007-07-19 Thread [EMAIL PROTECTED]
Grant, I'm wondering how you can encorporate this functionality in all your controller actions. For instance, if i have an edit action, then the id gets passed in to that function as its in the url. However, in an add operation there is no current id yet. Thus, i can't call this user defined funct

Re: i18n translation in db tables - how to do this like Symfony?

2007-07-19 Thread zwobot
Good question oleonav. I wondered how this works too. In general I want to use any label for an input field, seems like there is missing a parameter for an input label and you cannot use the second 'options' parameter to define a label as it seems. On Jul 17, 4:29 am, oleonav <[EMAIL PROTECTED]>