Problema com upload de arquivos

2007-10-22 Thread Geovane Silva
Pessoal,

gosto muito do cake, recentemente postei o link de um sistema que fiz em
cake.
Estou com outro projeto, mas estou quase desistindo de usar o cake por causa
de problemas com upload de arquivos.
Estou usando o componente do Túlio postado aqui no grupo, sendo que não
consigo resolver um probleminha:


Ocorre o seguinte erro: *Notice*: Undefined index: file in *
C:\wamp\www\rumo\app\controllers\components\upload.php* on line *38

*No view está assim:

input type=file name=file

E no  controller está assim:

$this-Upload-setPath(imagens);

$this-Upload-copyUploadedFile(file
,nomedoarquivonoservidorSemExtensao);

file é o nome do campo do form.

Grato,
-- 
Geovane Lopes da Silva
MSN: [EMAIL PROTECTED]
Fone: (92) 2121-1730 Ramal 222
Celular: (92) 9117-3879

--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~--~~~~--~~--~--~---



Re: Problema com upload de arquivos

2007-10-22 Thread Rafael Barbosa
Esse espaço antes do nome é proposital?

On 10/22/07, Geovane Silva [EMAIL PROTECTED] wrote:

 Pessoal,

 gosto muito do cake, recentemente postei o link de um sistema que fiz em
 cake.
 Estou com outro projeto, mas estou quase desistindo de usar o cake por
 causa de problemas com upload de arquivos.
 Estou usando o componente do Túlio postado aqui no grupo, sendo que não
 consigo resolver um probleminha:


 Ocorre o seguinte erro: *Notice*: Undefined index: file in *
 C:\wamp\www\rumo\app\controllers\components\upload.php* on line *38

 *No view está assim:

 input type=file name= file

 E no  controller está assim:

 $this-Upload-setPath(imagens);

 $this-Upload-copyUploadedFile( file
 ,nomedoarquivonoservidorSemExtensao);

 file é o nome do campo do form.

 Grato,
 --
 Geovane Lopes da Silva
 MSN: [EMAIL PROTECTED]
 Fone: (92) 2121-1730 Ramal 222
 Celular: (92) 9117-3879
 



-- 
Rafael Barbosa
Analista de Sistemas Web
Gradua Networks

--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~--~~~~--~~--~--~---



Re: Problema com upload de arquivos

2007-10-22 Thread Geovane Silva
É sem espaço mesmo. Acho que foi na hora de redigir o email.

Geovane

On 10/22/07, Rafael Barbosa [EMAIL PROTECTED] wrote:

 Esse espaço antes do nome é proposital?

 On 10/22/07, Geovane Silva [EMAIL PROTECTED] wrote:
 
  Pessoal,
 
  gosto muito do cake, recentemente postei o link de um sistema que fiz em
  cake.
  Estou com outro projeto, mas estou quase desistindo de usar o cake por
  causa de problemas com upload de arquivos.
  Estou usando o componente do Túlio postado aqui no grupo, sendo que não
  consigo resolver um probleminha:
 
 
  Ocorre o seguinte erro: *Notice*: Undefined index: file in *
  C:\wamp\www\rumo\app\controllers\components\upload.php* on line *38
 
  *No view está assim:
 
  input type=file name= file
 
  E no  controller está assim:
 
  $this-Upload-setPath(imagens);
 
  $this-Upload-copyUploadedFile( file
  ,nomedoarquivonoservidorSemExtensao);
 
  file é o nome do campo do form.
 
  Grato,
  --
  Geovane Lopes da Silva
  MSN: [EMAIL PROTECTED]
  Fone: (92) 2121-1730 Ramal 222
  Celular: (92) 9117-3879
 
 


 --
 Rafael Barbosa
 Analista de Sistemas Web
 Gradua Networks
 



-- 
Geovane Lopes da Silva
MSN: [EMAIL PROTECTED]
Consultor E-Government - Governo AM
Fone: (92) 2121-1730 Ramal 222
Celular: (92) 9117-3879

--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~--~~~~--~~--~--~---



Re: Problema com upload de arquivos

2007-10-22 Thread Geovane Silva
Já usei, qualquer nome ocorre o mesmo erro.

Geovane.

On 10/22/07, Marcelo Rodrigo [EMAIL PROTECTED] wrote:

 Geovane,

 Já tentou usar outro nome no campo?
 Não tenho certeza, mas 'file' pode ser alguma palavra reservada do
 XHTML/HTML.

 Faz o teste ai :)

 --
 Atenciosamente,

 Marcelo Rodrigo

 On 10/22/07, Geovane Silva [EMAIL PROTECTED] wrote:

  É sem espaço mesmo. Acho que foi na hora de redigir o email.
 
  Geovane
 
 
  On 10/22/07, Rafael Barbosa  [EMAIL PROTECTED]  wrote:
  
   Esse espaço antes do nome é proposital?
  
   On 10/22/07, Geovane Silva [EMAIL PROTECTED]  wrote:
   
Pessoal,
   
gosto muito do cake, recentemente postei o link de um sistema que
fiz em cake.
Estou com outro projeto, mas estou quase desistindo de usar o cake
por causa de problemas com upload de arquivos.
Estou usando o componente do Túlio postado aqui no grupo, sendo que
não consigo resolver um probleminha:
   
   
Ocorre o seguinte erro: *Notice*: Undefined index: file in *
C:\wamp\www\rumo\app\controllers\components\upload.php* on line *38
   
*No view está assim:
   
input type=file name= file
   
E no  controller está assim:
   
$this-Upload-setPath(imagens);
   
$this-Upload-copyUploadedFile( file
,nomedoarquivonoservidorSemExtensao);
   
file é o nome do campo do form.
   
Grato,
--
Geovane Lopes da Silva
MSN: [EMAIL PROTECTED]
Fone: (92) 2121-1730 Ramal 222
Celular: (92) 9117-3879
   
   
  
  
   --
   Rafael Barbosa
   Analista de Sistemas Web
   Gradua Networks
  
  
 
 
  --
  Geovane Lopes da Silva
  MSN: [EMAIL PROTECTED]
  Consultor E-Government - Governo AM
  Fone: (92) 2121-1730 Ramal 222
  Celular: (92) 9117-3879
 
 

 



-- 
Geovane Lopes da Silva
MSN: [EMAIL PROTECTED]
Consultor E-Government - Governo AM
Fone: (92) 2121-1730 Ramal 222
Celular: (92) 9117-3879

--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~--~~~~--~~--~--~---



Re: Problema com upload de arquivos

2007-10-22 Thread Rafael Barbosa
manda um pr($_FILES); antes do setPath e cola oq tá aparecendo.

On 10/22/07, Geovane Silva [EMAIL PROTECTED] wrote:

 Já usei, qualquer nome ocorre o mesmo erro.

 Geovane.

 On 10/22/07, Marcelo Rodrigo [EMAIL PROTECTED]  wrote:
 
  Geovane,
 
  Já tentou usar outro nome no campo?
  Não tenho certeza, mas 'file' pode ser alguma palavra reservada do
  XHTML/HTML.
 
  Faz o teste ai :)
 
  --
  Atenciosamente,
 
  Marcelo Rodrigo
 
  On 10/22/07, Geovane Silva  [EMAIL PROTECTED] wrote:
 
   É sem espaço mesmo. Acho que foi na hora de redigir o email.
  
   Geovane
  
  
   On 10/22/07, Rafael Barbosa  [EMAIL PROTECTED]  wrote:
   
Esse espaço antes do nome é proposital?
   
On 10/22/07, Geovane Silva [EMAIL PROTECTED]  wrote:

 Pessoal,

 gosto muito do cake, recentemente postei o link de um sistema que
 fiz em cake.
 Estou com outro projeto, mas estou quase desistindo de usar o cake
 por causa de problemas com upload de arquivos.
 Estou usando o componente do Túlio postado aqui no grupo, sendo
 que não consigo resolver um probleminha:


 Ocorre o seguinte erro: *Notice*: Undefined index: file in *
 C:\wamp\www\rumo\app\controllers\components\upload.php* on line *
 38

 *No view está assim:

 input type=file name= file

 E no  controller está assim:

 $this-Upload-setPath(imagens);

 $this-Upload-copyUploadedFile( file
 ,nomedoarquivonoservidorSemExtensao);

 file é o nome do campo do form.

 Grato,
 --
 Geovane Lopes da Silva
 MSN: [EMAIL PROTECTED]
 Fone: (92) 2121-1730 Ramal 222
 Celular: (92) 9117-3879


   
   
--
Rafael Barbosa
Analista de Sistemas Web
Gradua Networks
   
   
  
  
   --
   Geovane Lopes da Silva
   MSN: [EMAIL PROTECTED]
   Consultor E-Government - Governo AM
   Fone: (92) 2121-1730 Ramal 222
   Celular: (92) 9117-3879
  
  
 
 
 


 --
 Geovane Lopes da Silva
 MSN: [EMAIL PROTECTED]
 Consultor E-Government - Governo AM
 Fone: (92) 2121-1730 Ramal 222
 Celular: (92) 9117-3879
 



-- 
Rafael Barbosa
Analista de Sistemas Web
Gradua Networks

--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~--~~~~--~~--~--~---



Re: Problema com upload de arquivos

2007-10-22 Thread Rafael Barbosa
Se quiser me adiciona no google talk aí que eu te ajudo, to sem porra
nenhuma pra fazer aki no trampo hehe

On 10/22/07, Rafael Barbosa [EMAIL PROTECTED] wrote:

 manda um pr($_FILES); antes do setPath e cola oq tá aparecendo.

 On 10/22/07, Geovane Silva [EMAIL PROTECTED]  wrote:
 
  Já usei, qualquer nome ocorre o mesmo erro.
 
  Geovane.
 
  On 10/22/07, Marcelo Rodrigo  [EMAIL PROTECTED]  wrote:
  
   Geovane,
  
   Já tentou usar outro nome no campo?
   Não tenho certeza, mas 'file' pode ser alguma palavra reservada do
   XHTML/HTML.
  
   Faz o teste ai :)
  
   --
   Atenciosamente,
  
   Marcelo Rodrigo
  
   On 10/22/07, Geovane Silva  [EMAIL PROTECTED] wrote:
  
É sem espaço mesmo. Acho que foi na hora de redigir o email.
   
Geovane
   
   
On 10/22/07, Rafael Barbosa  [EMAIL PROTECTED]  wrote:

 Esse espaço antes do nome é proposital?

 On 10/22/07, Geovane Silva [EMAIL PROTECTED]  wrote:
 
  Pessoal,
 
  gosto muito do cake, recentemente postei o link de um sistema
  que fiz em cake.
  Estou com outro projeto, mas estou quase desistindo de usar o
  cake por causa de problemas com upload de arquivos.
  Estou usando o componente do Túlio postado aqui no grupo, sendo
  que não consigo resolver um probleminha:
 
 
  Ocorre o seguinte erro: *Notice*: Undefined index: file in *
  C:\wamp\www\rumo\app\controllers\components\upload.php* on line
  *38
 
  *No view está assim:
 
  input type=file name= file
 
  E no  controller está assim:
 
  $this-Upload-setPath(imagens);
 
  $this-Upload-copyUploadedFile( file
  ,nomedoarquivonoservidorSemExtensao);
 
  file é o nome do campo do form.
 
  Grato,
  --
  Geovane Lopes da Silva
  MSN: [EMAIL PROTECTED]
  Fone: (92) 2121-1730 Ramal 222
  Celular: (92) 9117-3879
 
 


 --
 Rafael Barbosa
 Analista de Sistemas Web
 Gradua Networks


   
   
--
Geovane Lopes da Silva
MSN: [EMAIL PROTECTED]
Consultor E-Government - Governo AM
Fone: (92) 2121-1730 Ramal 222
Celular: (92) 9117-3879
   
   
  
  
  
 
 
  --
  Geovane Lopes da Silva
  MSN: [EMAIL PROTECTED]
  Consultor E-Government - Governo AM
  Fone: (92) 2121-1730 Ramal 222
  Celular: (92) 9117-3879
   
 


 --
 Rafael Barbosa
 Analista de Sistemas Web
 Gradua Networks




-- 
Rafael Barbosa
Analista de Sistemas Web
Gradua Networks

--~--~-~--~~~---~--~~
Recebeu esta mensagem porque está inscrito em Grupo Cake PHP Português do 
Grupos Google.
 Para enviar mensagens para este grupo, envie um email para 
cake-php-pt@googlegroups.com
 Para anular a inscrição neste grupo, envie um email para [EMAIL PROTECTED]
 Para mais opções, visite este grupo em 
http://groups.google.com/group/cake-php-pt?hl=pt-PT
-~--~~~~--~~--~--~---



Re: select box validation in CakaPHP 1.2

2007-10-22 Thread senser

Hi Japheth,

The problem is that if I use 'selected'='' and when form doesn't
validate  because wrong fields the application doesn't remember the
selected value in list box. For example if user selects 2001-2002 tax
year and submit form with wrong field for tax, form doesn't validate
and remember the entered value for tax, but doesn't remember the
selected tax year because of using 'selected'=''

On Oct 21, 10:46 am, Japheth [EMAIL PROTECTED] wrote:
 Hi Senser,

 I've managed to use showEmpty = ' ', to provide an option that is
 essentially blank.  You could then use trim() if you found that ' '
 still was counted as a value?
 Also, if you want to make sure that the empty option is selected by
 default, you could add 'selected' = ' ' to your options array also.

 Does that make sense?  If so, did it help?

 Cheers,
 Japheth

 On Oct 20, 9:00 pm, senser [EMAIL PROTECTED] wrote:

  I found this link while searching for resolve but it didn't help -
  when I use array(showEmpty='Select ...') it shows in select box but
  it's not selected by default and doesn't help :(

  May be select boxes must be validated in different manner but I don't
  know how 

  On Oct 20, 12:22 pm, manuj bansal [EMAIL PROTECTED] wrote:

   your problem may be solved by this link

  http://groups.google.com/group/cake-php/browse_thread/thread/8c89ca42...

   On Oct 20, 12:50 pm, senser [EMAIL PROTECTED] wrote:

Hi  manuj.

Your proposal didn't solve my problem. I think I did read somewhere in
group postings that using fromHelpr-input is the right way for form
fields and using formHelper-select, formHelper-label, ... etc will
be deprecated in next versions of CakePHP. I'm not sure for this and
correct me if I'm wrong.

On Oct 19, 8:06 pm, manuj bansalr [EMAIL PROTECTED] wrote:

 i didnt get your code you want select option then why r you going thru
 input function

 try it

 *view code

 echo $form-label('modelname.name')
 echo $form-select('modelname.name',array('value'='text'));
 echo $form-error('it can't be blank');

 ***model code*

 var
 $validate=array('name'=VALID_NOT_EMPTY);

 IT IS FOR SELECT OPTION

 On Oct 19, 9:24 pm, senser [EMAIL PROTECTED] wrote:

  Hi there!

  I'm trying to write a code for displaying a select box with several
  options (tax years for example) and I have to validate the data 
  passed
  by that select box. I want the user to must select an option from 
  the
  list.
  Here is the code from view file where I populate the box using
  formHelper:

  /CODE**/
  print $form-input('CustomerTaxYear.tax_years_id',
  array('type'='select', 'label'='Tax Year', 'options'=
  $taxYearsArray,  'size'=3,'error'=array('required'='Tax Year is
  obligatory', 'maxlength'='Tax year code max length is 3 symbols',
  'number'='Tax year code must be a number')));
  /CODE_END/

  and here is the part of validation array:

  /CODE**/
  var
  $validate=array( 'tax_years_id'=array('required'=VALID_NOT_EMPTY,
  
  'maxlength'=array('rule'=array('between',1,3)),
  
  'number'=VALID_NUMBER));
  /CODE_END/

  The result is that if the user doesn't select an element from the
  select box, there is no error message displayed and the validation 
  is
  passed but the form data is not stored in DB, because the field
  tax_years_id doesn't have default value which is correct 
  behaviour.

  I've tried with 'showEmpty' set to true but with no success. If 
  there
  is no value selected in select box, the passed array doesn't even 
  have
  an a element called 'tax_years_id'. (i make a dump of $this-data 
  and
  in the array element with name 'tax_years_id' is missing). I've also
  tried to make an empty element and select it by default, but I think
  this is ugly approach, because if user selects some tax year but
  form validation fails by reason of other wrong filled field and
  selected element in tax year select box is lost.- Hide quoted text -

- Show quoted text -


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: About a mysql query

2007-10-22 Thread grigri

Model::findAll() only indexes fields that are present in the database;
anything else is returned as you see (numeric index).

You can write an afterFind() callback in your model to insert the
fields into the correct positions.

On Oct 19, 11:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:
 Hey,

 I am trying to do this:
 $this-set('announcements', $this-Announcement-findAll(null,
 array('id', 'name','SUBSTRING_INDEX(content,  , 20) AS teaser',
 'pic_filename'), 'add_date DESC'));

 and it doesn't work properly ..

 here is part of the dump of the resulting object:
 array(2) {
 [Announcement]=
 array(3) {
   [id]=
   string(1) 2
   [name]=
   string(18) Stire senzationala
   [pic_filename]=
   string(8) nicu.jpg
 }
 [0]=
 array(1) {
   [teaser]=
   string(7) content
 }
   }

 Any help would be apreciated!

 Thx


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Views folder having deeper folder levels? Like views/admin/admin1/index.ctp?

2007-10-22 Thread AD7six



On Oct 22, 2:52 am, Soulcatcher [EMAIL PROTECTED] wrote:
 Controller::render($action = null, $layout = null, $file = null)

When you already tried (please tell me you tried) what was wrong with
either:

$this-viewPath = 'controller_name/subfolder';
$this-render('view_file');

or
$this-render('subfolder/view_file');

in any event if you specifiy $file you are specifying the absolute
path the the VIEW file to render. I don't see how that cannot be a
solution to your question.

hth,

AD


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Blank page when debug = 0

2007-10-22 Thread Charlie van de Kerkhof

Thnx Samuel, but still no luck.
I even reverted cake core to version 5676 and removed all files in /
tmp and app/tmp and kept the directory structure.
I am really puzzled.

Can anyone tell me what the difference is in debug = 0 and debug  0
about core cake libs and including files etc.? Maybe I can trackback
the issue.

Or maybe fully turn off cache?

Thanks in advance
- Charlie


On Oct 22, 3:02 am, Samuel DeVore [EMAIL PROTECTED] wrote:
 clear the various cache folders in /tmp/caches  and make sure that the
 needed structures exist in the tmp folder

 Sam D

 On 10/21/07, Charlie van de Kerkhof [EMAIL PROTECTED] wrote:





  Hi Pablo,thnx for your reply.
  Also did that. Even with debug=3 but no errors

  On Oct 21, 6:06 pm, Pablo Viojo [EMAIL PROTECTED] wrote:
   Set debug=1 and check if you have errors on your page

   --
   Pablo Viojo
   [EMAIL PROTECTED]://pviojo.net

   On 10/21/07, Charlie van de Kerkhof [EMAIL PROTECTED] wrote:

Hi,
I still have this problem. Searched this forum about this subject and
did all suggestions:
1. cleaned the app/tmp/cache/models, app/tmp/cache/persistent and app/
tmp/cache/views folders
2. Updated cake core folder to latest svn version from 1.2.x.x branche
3. checked the rights on the app/tmp folders (Now even 777)

Still nothing.
What is exactly the difference between debug=0 and debug=1?

Anyone more suggestions?
thnx
- Charlie

 --
 (the old fart) the advice is free, the lack of crankiness will cost you

 - its a fine line between a real question and an idiot

 http://blog.samdevore.com/archives/2007/03/05/when-open-source-bugs-me/


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Update gone wrong.

2007-10-22 Thread Charlie van de Kerkhof

I have the same problem and the solution of nate didn't help.
I think this is a bug but I don't know for sure:
(latest svn version of 1.2.x.x. branches)

In APP/config/core.php:
- Configure::write('Cache.disable', true);
- Cache::config('default', array('engine' = 'File'));

Gives the warning 512 where [EMAIL PROTECTED] talked about.
Warning (512): Cache not configured. Please use Cache::config(); in
APP/config/core.php [CORE/cake/bootstrap.php, line 52]
and
Warning (2): Cannot modify header information - headers already sent
by (output started at /.../APP/cake/basics.php:773)

But if I configure the lines below my app does work:
- Configure::write('Cache.disable', false);
- Cache::config('default', array('engine' = 'File'));

Is this ok? Or is it a bug?
thnx!
- Charlie

On Oct 16, 11:54 pm, nate [EMAIL PROTECTED] wrote:
 You don't need to modify any core CakePHP files.  Just remove the
 $cakeCache var from core.php, and add the following:

 Cache::config('default', array('engine' = 'File'));

 You might want to just replace your core.php with a fresh copy from
 the latest nightly and re-input your settings.

 On Oct 16, 5:08 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

  good thinking, i'll wait until tomorrow...

  On Oct 16, 2:06 pm, Gwoo [EMAIL PROTECTED] wrote:

   could be a problem with the nightly


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Query help

2007-10-22 Thread LS

Hello everyone!
I promise I tried searching for this in this group and other sql-
related groups... Maybe I just haven't searched for the right thing...
Or even, maybe my head is not working properly...

Here's the thing: I have 2 tables. One with articles and one with
categories... It goes like this (i used the model names):

Article (id, date, name, description)
ArticleCategory (id, article_id, name)

ids are integer, date is datetime, names are varchar and description
is text.

So, I have many articles with n categories each. And I want to grab
all the articles that are from Category One _and_ Category
Three (just an example, ofcourse).
I just couldn't find a suitable query to retrieve that... I'm starting
to wonder if it is even possible to do it using only one query...

Any help is appreciated... Thanks in advance!
- Sergio


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Update gone wrong.

2007-10-22 Thread LS

I got this problem once...
The cause is that i deleted everything under tmp... Including the
cache dir. If the cache dir is not there. Cake will give out an error,
and does not create the directory. Try creating it, then you problem
SHOULD be fixed. =)

Regards,
- Sergio

On Oct 22, 8:22 am, Charlie van de Kerkhof [EMAIL PROTECTED]
wrote:
 I have the same problem and the solution of nate didn't help.
 I think this is a bug but I don't know for sure:
 (latest svn version of 1.2.x.x. branches)

 In APP/config/core.php:
 - Configure::write('Cache.disable', true);
 - Cache::config('default', array('engine' = 'File'));

 Gives the warning 512 where [EMAIL PROTECTED] talked about.
 Warning (512): Cache not configured. Please use Cache::config(); in
 APP/config/core.php [CORE/cake/bootstrap.php, line 52]
 and
 Warning (2): Cannot modify header information - headers already sent
 by (output started at /.../APP/cake/basics.php:773)

 But if I configure the lines below my app does work:
 - Configure::write('Cache.disable', false);
 - Cache::config('default', array('engine' = 'File'));

 Is this ok? Or is it a bug?
 thnx!
 - Charlie

 On Oct 16, 11:54 pm, nate [EMAIL PROTECTED] wrote:

  You don't need to modify any core CakePHP files.  Just remove the
  $cakeCache var from core.php, and add the following:

  Cache::config('default', array('engine' = 'File'));

  You might want to just replace your core.php with a fresh copy from
  the latest nightly and re-input your settings.

  On Oct 16, 5:08 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

   good thinking, i'll wait until tomorrow...

   On Oct 16, 2:06 pm, Gwoo [EMAIL PROTECTED] wrote:

could be a problem with the nightly


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Query help

2007-10-22 Thread Charlie van de Kerkhof

I assume that you also have a Category model?
Then setup the right associations in Article and Category and
ArticleCategory and use the $this-resursive = 1 var in Article or
Category to get the associations of that article or category

- Charlie

On Oct 22, 1:25 pm, LS [EMAIL PROTECTED] wrote:
 Hello everyone!
 I promise I tried searching for this in this group and other sql-
 related groups... Maybe I just haven't searched for the right thing...
 Or even, maybe my head is not working properly...

 Here's the thing: I have 2 tables. One with articles and one with
 categories... It goes like this (i used the model names):

 Article (id, date, name, description)
 ArticleCategory (id, article_id, name)

 ids are integer, date is datetime, names are varchar and description
 is text.

 So, I have many articles with n categories each. And I want to grab
 all the articles that are from Category One _and_ Category
 Three (just an example, ofcourse).
 I just couldn't find a suitable query to retrieve that... I'm starting
 to wonder if it is even possible to do it using only one query...

 Any help is appreciated... Thanks in advance!
 - Sergio


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Update gone wrong.

2007-10-22 Thread Charlie van de Kerkhof

Still have this problem.
Warning (512): Cache not configured. Please use Cache::config(); in
APP/config/core.php [CORE/cake/bootstrap.php, line 52]
But the other one is dissapeared when removing the cache files.
My directory in tmp is still intact

Maybe because I disable my cache but Cake still needs some sort of
cache config?

- Charlie

On Oct 22, 1:29 pm, LS [EMAIL PROTECTED] wrote:
 I got this problem once...
 The cause is that i deleted everything under tmp... Including the
 cache dir. If the cache dir is not there. Cake will give out an error,
 and does not create the directory. Try creating it, then you problem
 SHOULD be fixed. =)

 Regards,
 - Sergio

 On Oct 22, 8:22 am, Charlie van de Kerkhof [EMAIL PROTECTED]
 wrote:

  I have the same problem and the solution of nate didn't help.
  I think this is a bug but I don't know for sure:
  (latest svn version of 1.2.x.x. branches)

  In APP/config/core.php:
  - Configure::write('Cache.disable', true);
  - Cache::config('default', array('engine' = 'File'));

  Gives the warning 512 where [EMAIL PROTECTED] talked about.
  Warning (512): Cache not configured. Please use Cache::config(); in
  APP/config/core.php [CORE/cake/bootstrap.php, line 52]
  and
  Warning (2): Cannot modify header information - headers already sent
  by (output started at /.../APP/cake/basics.php:773)

  But if I configure the lines below my app does work:
  - Configure::write('Cache.disable', false);
  - Cache::config('default', array('engine' = 'File'));

  Is this ok? Or is it a bug?
  thnx!
  - Charlie

  On Oct 16, 11:54 pm, nate [EMAIL PROTECTED] wrote:

   You don't need to modify any core CakePHP files.  Just remove the
   $cakeCache var from core.php, and add the following:

   Cache::config('default', array('engine' = 'File'));

   You might want to just replace your core.php with a fresh copy from
   the latest nightly and re-input your settings.

   On Oct 16, 5:08 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

good thinking, i'll wait until tomorrow...

On Oct 16, 2:06 pm, Gwoo [EMAIL PROTECTED] wrote:

 could be a problem with the nightly


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CakePHP SMF integration

2007-10-22 Thread cakeFreak

I just did a istake in my first post.
Correct point 7 with the following (rename to *session_smf.php*
instead of *session_cake.php* as written above)

-
7. create a file in cake/libs/ called *session_smf.php* [this extends
the original Cake Session lib that we moved in *session_cake.php*.
go in the bin and copy and past what you will find in here:
http://bin.cakephp.org/view/1933866502

into the newly created file.
--


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: $ajax-editor

2007-10-22 Thread Harro

Realised my errror, I forgot to add

$this-autoRender=false;

to my function.
Harro

On Oct 22, 1:32 am, Harro [EMAIL PROTECTED] wrote:
 Is there something I am missing here, I am trying to use the editor
 helper to create an edit in place text field.
 I am using this:

 ?php echo $ajax-editor('text_1', 'change'); ?

 However when I click the ok button to send the request via ajax, I get
 the missing view error for the change() function, shouldn't it just
 send the request to the function and not require a view?

 Thanks for any help, Harro.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Query help

2007-10-22 Thread LS

Not really...
This is a one-to-many association...
The ArticleCategory field 'name' is what i want to search for.
I know I can do a one-to-many relationship... and then, I can grab all
the fields and show only those that match the criteria... What I was
wanting is for the sql server return me only the data I need...

-Sergio

On Oct 22, 8:33 am, Charlie van de Kerkhof [EMAIL PROTECTED]
wrote:
 I assume that you also have a Category model?
 Then setup the right associations in Article and Category and
 ArticleCategory and use the $this-resursive = 1 var in Article or
 Category to get the associations of that article or category

 - Charlie

 On Oct 22, 1:25 pm, LS [EMAIL PROTECTED] wrote:

  Hello everyone!
  I promise I tried searching for this in this group and other sql-
  related groups... Maybe I just haven't searched for the right thing...
  Or even, maybe my head is not working properly...

  Here's the thing: I have 2 tables. One with articles and one with
  categories... It goes like this (i used the model names):

  Article (id, date, name, description)
  ArticleCategory (id, article_id, name)

  ids are integer, date is datetime, names are varchar and description
  is text.

  So, I have many articles with n categories each. And I want to grab
  all the articles that are from Category One _and_ Category
  Three (just an example, ofcourse).
  I just couldn't find a suitable query to retrieve that... I'm starting
  to wonder if it is even possible to do it using only one query...

  Any help is appreciated... Thanks in advance!
  - Sergio


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 1.2.x manual

2007-10-22 Thread keymaster

Any chance the 1.2 manual will be released with the 1.2 pre-beta ?

Or are we still holding out for the beta release of the software when
new functionality will be frozen?


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Query help

2007-10-22 Thread Amit Badkas
On 10/22/07, LS [EMAIL PROTECTED] wrote:


 Hello everyone!
 I promise I tried searching for this in this group and other sql-
 related groups... Maybe I just haven't searched for the right thing...
 Or even, maybe my head is not working properly...

 Here's the thing: I have 2 tables. One with articles and one with
 categories... It goes like this (i used the model names):

 Article (id, date, name, description)
 ArticleCategory (id, article_id, name)

 ids are integer, date is datetime, names are varchar and description
 is text.

 So, I have many articles with n categories each. And I want to grab
 all the articles that are from Category One _and_ Category
 Three (just an example, ofcourse).
 I just couldn't find a suitable query to retrieve that... I'm starting
 to wonder if it is even possible to do it using only one query...

 Any help is appreciated... Thanks in advance!
 - Sergio


- I think you are defining model relations incorrectly here. The correct
relations may be category hasMany articles and article belongsTo category
The categories table will have id, name and the articles table will have id,
date, name, description, category_id. Now to find articles in two
categories, $this-Article-findAll('Category.name = Category One OR
Category.name = Category Three') will work

-- 
Regards,
Amit

http://amitrb.wordpress.com/
http://coppermine-gallery.net/
http://cheesecake-photoblog.org/
http://www.sanisoft.com/blog/author/amitbadkas

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Query help

2007-10-22 Thread LS

Amit

I don't really think the declarations are wrong... but there can be
duplicate names in the Category model...

Here:

class Article extends AppModel {
  var $name = 'Article';
  var $hasMany = 'ArticleCategory';
}

class ArticleCategory extends AppModel {
  var $name = 'ArticleCategory';
  var $belongsTo = 'Article';
}

your solution of $this-Article-findAll('Category.name = Category
One OR Category.name = Category Three')  will find articles in
Category One OR articles in Category Three. Not those that have
BOTH categories...

I'm starting to think that I might have to do it manually into the
model... =)

Also, if anyone has a solution that needs to change my database
scructure (something like habtm), i'm open to suggestions... the
project is not even into alpha yet.. =)

Thanks everyone
- Sergio

On Oct 22, 8:32 am, Amit Badkas [EMAIL PROTECTED] wrote:
 On 10/22/07, LS [EMAIL PROTECTED] wrote:





  Hello everyone!
  I promise I tried searching for this in this group and other sql-
  related groups... Maybe I just haven't searched for the right thing...
  Or even, maybe my head is not working properly...

  Here's the thing: I have 2 tables. One with articles and one with
  categories... It goes like this (i used the model names):

  Article (id, date, name, description)
  ArticleCategory (id, article_id, name)

  ids are integer, date is datetime, names are varchar and description
  is text.

  So, I have many articles with n categories each. And I want to grab
  all the articles that are from Category One _and_ Category
  Three (just an example, ofcourse).
  I just couldn't find a suitable query to retrieve that... I'm starting
  to wonder if it is even possible to do it using only one query...

  Any help is appreciated... Thanks in advance!
  - Sergio

 - I think you are defining model relations incorrectly here. The correct
 relations may be category hasMany articles and article belongsTo category
 The categories table will have id, name and the articles table will have id,
 date, name, description, category_id. Now to find articles in two
 categories, $this-Article-findAll('Category.name = Category One OR
 Category.name = Category Three') will work

 --
 Regards,
 Amit

 http://amitrb.wordpress.com/http://coppermine-gallery.net/http://cheesecake-photoblog.org/http://www.sanisoft.com/blog/author/amitbadkas


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



More HABTM : Adding another model to the filtered findAll()

2007-10-22 Thread Bob Mattax

I've looked through and tried all of the HABTM filtering discussions,
and have tried to adapt them to my needs, but I just can't seem to get
it to work.  Here is the basic set of relationships that I'm trying to
find results for:

Units - Buildings - HABTM - Campuses

I'm working on making a small rental property application, and I want
to be able to find the units with certain specs that match certain
criteria for the unit, but also exist within a certain campus.  I've
tried binding models on the fly, but I'm not getting very far.  The
queries displayed in my debugging always come short of including all
the joins I would have expected.

Any help would be appreciated.

Thanks,
Bob


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Latest Releases not available for download

2007-10-22 Thread Andy Pearson

Hey,

I was planning to download the latest version and get started with a
new project, unfortunately the download pages do not have anything
available to download.

The page is here: http://cakeforge.org/frs/?group_id=23release_id=340

Sorry if this has already been raised.

Andy


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Passing information from an iframe to the parent node using php

2007-10-22 Thread Amit Badkas
On 10/20/07, DonGato [EMAIL PROTECTED] wrote:


 WT.. !!

 amazing that something as simple as this was not found anywhere else

 thanks dude, you saved my life today.


- Thanks, I have found this from at
http://www.htmlhelp.com/reference/html40/forms/form.html

-- 
Regards,
Amit

http://amitrb.wordpress.com/
http://coppermine-gallery.net/
http://cheesecake-photoblog.org/
http://www.sanisoft.com/blog/author/amitbadkas

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Latest Releases not available for download

2007-10-22 Thread Darian Anthony Patrick

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I don't see *any* files available.  Strange.  They're probably working
on fixing the problem.

Andy Pearson wrote:
 Hey,
 
 I was planning to download the latest version and get started with a
 new project, unfortunately the download pages do not have anything
 available to download.
 
 The page is here: http://cakeforge.org/frs/?group_id=23release_id=340
 
 Sorry if this has already been raised.
 
 Andy
 
 
  

- --
Darian Anthony Patrick, GWAS, GSSP-Java, ZCE
Principal, Application Development
Criticode LLC
(215) 240-6566 Office
(866) 789-2992 Facsimile
Web:   http://criticode.com
Email: [EMAIL PROTECTED]
JID:   [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-

iD8DBQFHHLNoKpzEXPWA4IcRArnHAJ9NJJsJ5/+qzM0ZCMXXuTmXZ/YaJgCfQRRH
IjiFLzLUZhxNp+4FuYZzfNg=
=NFf8
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: unbind and Pagination

2007-10-22 Thread Lion29

I would love this feature too!
Now I am plazing with the optimisations of mz queries and I came
across the wall since the unbinding is nmot working for the
pagination!
And another thing. I am caching mz querz results. so it would be verz
usefull I can pass another parameter to the pagination function like

$DATA = Cache::read('publications');
if($DATA === false){
   $this-Publication-unbindModel(array('belongsTo' =
array('Parent', 'User')));
   $DATA = $this-Publications-findAll();
   Cache::write('config', $DATA,  '+1 month');
}

$this-paginate = array('data' = $DATA);

so on $this-pagiante() I would get the pagination of the given data
and pagiante() wouldnt execute a query.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Query help

2007-10-22 Thread grigri

Try something like this:

$this-Article-bindModel(array('hasOne' = array(
  'Category1' = array('className' = 'ArticleCategory'),
  'Category2' = array('className' = 'ArticleCategory')
)));
$blah = $this-Article-findAll(array('Category1.name' = 'Blobble',
'Category2.name' = 'Blibble'));

On Oct 22, 2:38 pm, LS [EMAIL PROTECTED] wrote:
 Amit

 I don't really think the declarations are wrong... but there can be
 duplicate names in the Category model...

 Here:

 class Article extends AppModel {
   var $name = 'Article';
   var $hasMany = 'ArticleCategory';

 }

 class ArticleCategory extends AppModel {
   var $name = 'ArticleCategory';
   var $belongsTo = 'Article';

 }

 your solution of $this-Article-findAll('Category.name = Category
 One OR Category.name = Category Three')  will find articles in
 Category One OR articles in Category Three. Not those that have
 BOTH categories...

 I'm starting to think that I might have to do it manually into the
 model... =)

 Also, if anyone has a solution that needs to change my database
 scructure (something like habtm), i'm open to suggestions... the
 project is not even into alpha yet.. =)

 Thanks everyone
 - Sergio

 On Oct 22, 8:32 am, Amit Badkas [EMAIL PROTECTED] wrote:

  On 10/22/07, LS [EMAIL PROTECTED] wrote:

   Hello everyone!
   I promise I tried searching for this in this group and other sql-
   related groups... Maybe I just haven't searched for the right thing...
   Or even, maybe my head is not working properly...

   Here's the thing: I have 2 tables. One with articles and one with
   categories... It goes like this (i used the model names):

   Article (id, date, name, description)
   ArticleCategory (id, article_id, name)

   ids are integer, date is datetime, names are varchar and description
   is text.

   So, I have many articles with n categories each. And I want to grab
   all the articles that are from Category One _and_ Category
   Three (just an example, ofcourse).
   I just couldn't find a suitable query to retrieve that... I'm starting
   to wonder if it is even possible to do it using only one query...

   Any help is appreciated... Thanks in advance!
   - Sergio

  - I think you are defining model relations incorrectly here. The correct
  relations may be category hasMany articles and article belongsTo category
  The categories table will have id, name and the articles table will have id,
  date, name, description, category_id. Now to find articles in two
  categories, $this-Article-findAll('Category.name = Category One OR
  Category.name = Category Three') will work

  --
  Regards,
  Amit

 http://amitrb.wordpress.com/http://coppermine-gallery.net/http://chee...


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: find all by relationship

2007-10-22 Thread Cheeze

I second Jon's suggestion. Most straightforward.

On Oct 22, 8:29 am, Jon Bennett [EMAIL PROTECTED] wrote:
  I've been looking for a while but I can't seem to find the solution.

  Basically, I have Countries, which has many States, every State has
  many Cities, and every City has many Users.
  I'm trying to get all the Users in a specified State, and I don't want
  to put a state_id in the user table, because it's relative to the city
  hes.

 I would do this with 2 queries. First, get the IDs of all the cities
 in the state, then get all the users that belong to those Cities, eg:

 $cities = $this-User-City-generateList(array('City.state_id'=$state_id));

 $users = $this-User-findAll(array('User.city_id'=$cities));

 hth

 jon

 --

 jon bennett
 w:http://www.jben.net/
 iChat (AIM): jbendotnet Skype: jon-bennett


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Someone did some moderating?

2007-10-22 Thread Charlie van de Kerkhof

Hi,

I posted a couple of messages to this post this morning and now two of
them are gone. The whole topic seems to have dissappeared...
Even in my google group profile.
Someone did some enthousiastic moderating? Or is it just a bug in
google group?

- Charlie


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Weird missing action error

2007-10-22 Thread Steveston

Everything worked properly last week. I did some changes and, for
somehow, the application did not work properly anymore.

I have two forms in my view page:

echo $html-formTag(/users/listUsers);
echo $html-formTag(/users/searchUsers);

Consequently, I have two methods in the controller:

function listUsers()
function searchUsers()

When submitting the search user form, everything is fine
But when submitting the list user form, I get:

You are seeing this error because the action listUsers  is not defined
in controller UsersController

Notice: this error is being rendered by the app/views/errors/
missing_action.tpl.php view file, a user-customizable error page for
handling invalid action dispatches.

Fatal: Create Method:

?php
class UsersController extends AppController
{
function listUsers()
{

}
}
?

in file : app\controllers\users_controller.php

Error: Unable to execute action listUsers in UsersController

I do have listUsers in the controller.

What happened?

Thanks,


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



AclAdmin dAuth Deny

2007-10-22 Thread seacloud9

How do I query the AclAdmin plugin from my app/controllers/
post_controller...?
I have access to my user table.  I have followed these steps:

# Get the code from the Demo download section
# Create the acl tables using the sql script that comes with cake
# Put the plugin into your own application
# Define the name of your user table in the plugin app controller file
# Use the plugin to create the aros, acos and rules as you want for
your own application
# Add the code from the previous post on ACL to check the ACL for each
page request

So I can test rules on the home AclAdmin page and when I test it the
correct users have the correct amount of access.  Sweet. But when I go
to the page it is anyone can access the page..

So I must be misreading or botching something up.  I have tried
tinkering around with adding

$this-requestAction('/AclAdmin/post/index'); Actions like this to
access the plugin although it does not seem to be working..

I have also not been able to get access working for the demo itself.
Everything test properly but nothing is implmented..?

AclAdminAPppController:

var $components = array('AC','Acl');
var $helpers = array();
//Was   var $argSeparator = '|'; // The default is : which is used as an
axo name seperator.
var $argSeparator = ':'; // The default is : which is used as an axo
name seperator.
var $uses = array('Aro','Aco');
var $userModel = 'User';
var $userModelAlias = 'username';
var $AclMode = 'full';

I have also looked at :
http://groups.google.com/group/cake-php/browse_thread/thread/afe4ac6b1e7dc096/7321457990d50bf0?hl=enlnk=gstq=AclAdmin#7321457990d50bf0
http://www.ad7six.com/MiBlog/AclPart2

I know that I am missing something that might be obvious and I know I
am very close.  Please let me know if you have any clues..

I also don't know if I am reading this properly and if it relates
which I am sure it does..

This plugin will allow you to edit the access control rules for your
applicaiton. It does not in itself add access control to your
application - for that you need to query the rules you define here in
your app_controller or whever else is most appropriate to your
situation. However, the download does come with access control applied
to the plugin itself by default, to see and/or edit take a look at the
generic 'noswad' controller that is used in the download.

The plugin is currently using full mode, which means that acos will be
of the form app:controller:action or plugin:controller:action.

You can run a test to see if an aro can access an aco or not here, or
view more detailed info by using the menu above.

Any Help Would be greatly appreciated thank you.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Someone did some moderating?

2007-10-22 Thread Eric

Same trouble for me. My post gone away.

On 22 oct, 17:21, Charlie van de Kerkhof [EMAIL PROTECTED] wrote:
 Hi,

 I posted a couple of messages to this post this morning and now two of
 them are gone. The whole topic seems to have dissappeared...
 Even in my google group profile.
 Someone did some enthousiastic moderating? Or is it just a bug in
 google group?

 - Charlie


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Someone did some moderating?

2007-10-22 Thread Gwoo

it wasnt me...I suspect a google group error.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Problem with bake

2007-10-22 Thread Conrad

I am on a VPS server that I own.  I have no indications that the mysql
server
is going down.  The mysql server is very lightly loaded, only 35 total
db's
and some of those are seldom used, as they are for PHPList apps that
are used only occasionally.
Conrad

On Oct 21, 10:16 pm, Wayne Fay [EMAIL PROTECTED] wrote:
 I suspect, if you had a sufficiently high level of logging and tracing
 in your network and on the various servers involved when that error
 message popped up, that you'd discover something interesting, probably
 timeouts to your Mysql instance.

 PHP doesn't just randomly report server has gone away -- there must
 be a reason. I'll assume you're in a shared server environment and you
 have no control over the load of your machines.

 Wayne

 On 10/20/07, Conrad [EMAIL PROTECTED] wrote:



  Of which none appys the mysql server is working fine for all other
  applications

  On Oct 19, 5:59 pm, Wayne Fay [EMAIL PROTECTED] wrote:
   RTFM :-)http://dev.mysql.com/doc/refman/5.0/en/gone-away.html

   Wayne

   On 10/19/07, Conrad [EMAIL PROTECTED] wrote:

I am having the same problems - in trying to create controller for
'user' .
I get the message
1. DESCRIBE `users` 2006: MySQL server has gone away
BUT the controller is written.

in trying to create views I get this (index.thtml)

  
h2List Users/h2

table cellpadding=0 cellspacing=0
tr
   thCreated/th
   thActions/th
/tr
?php foreach ($users as $user): ?
tr
   td?php echo $user['User']['0']; ?/td
   td class=actions
   ?php echo $html-link('View','/users/view/' .
  $user['User']['id'])?

   ?php echo $html-link('Edit','/users/edit/' .
  $user['User']['id'])?

   ?php echo $html-link('Delete','/users/delete/' .
  $user['User']
['id'], null, 'Are you sure you want to delete id ' . $user['User']
['id'])?
   /td
/tr
?php endforeach; ?
/table

  ---
Bake.php finds the tables or it would not display the names for
choice.

Thanks,
Conrad
On Oct 18, 9:16 am, Jakobloekke [EMAIL PROTECTED] wrote:
 Hi guys,
 I'm new to cakephp, and I'm stuck with a problem using the bake
 script:

 I can bake a DB configuration without problems.
 When I try to bake a model, my terminal prints out some sql-errors,
 but I can create a new model manually.

 When I try to bake a controller I get the following error, and:
 Fatal error: ConnectionManager::getDataSource - Non-existent data
 source default in /Library/WebServer/cake1.2.x.x/cake/libs/model/
 connection_manager.php on line 111
 Then the bake script terminates.

 Can anyone tell me where I went wrong?

 thanks,
 Jakob


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



About the definition of 'singular' and 'plural' in naming conventions

2007-10-22 Thread skyblueink

As you know, the distinction between singular and plural forms of
nouns is important in Cake naming convention. That is, model names
(class names and file names) are supposed to be singular, while table
names, controller names and view names are to be plural.

For example, we have LineItem and line_item.php in contrast to
LineItemsController and line_items_controller.php, and there does not
seem to be any problems because 'item' has a regular plural form of
'items.'

But how about the irregular forms of nouns? Like 'person' and
'people'? Don't we have Person and persons.php in contrast to
PeopleController and people_controller.php? From this singulra-plural
convention, I suspect that Cake itself has a rule or table (or a
dictionary) of singular nouns vs. plural nouns like the following, to
get the framework run.

person - people
item - items
potato - potatoes
knife - knives
fish - fish
woman - women
...

My question is how good or flexible the rules or the table are.

(1) Is 'PersonsController' instead of 'PeopleController' as a
controller class name intolerable to Cake when 'Person' is the model
class name?
(2) When 'Knife' is supplied as a model name, is Cake smart enough to
take 'KnivesController' and  rule out 'KnifesController'?

To make the long story short, what is the CakePHP's definition of
singular and plural nouns? How much should we count on it?


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: About the definition of 'singular' and 'plural' in naming conventions

2007-10-22 Thread AD7six



On Oct 22, 9:44 pm, skyblueink [EMAIL PROTECTED] wrote:

snip
Did you try any of your questions? You could have checked all of those
possibilities in less time than it took to write your message ;). In
any event if you don't get what you expect add your own inflection
rules and then you will.

pr (Inflector::pluralize('person')); die;

AD


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: About the definition of 'singular' and 'plural' in naming conventions

2007-10-22 Thread Wayne Fay

The plural/singular code is in the Inflector class, under cake/libs.
And as AD76 added, you can add your own rules by editing
app/config/inflections.php.

Wayne

On 10/22/07, AD7six [EMAIL PROTECTED] wrote:



 On Oct 22, 9:44 pm, skyblueink [EMAIL PROTECTED] wrote:

 snip
 Did you try any of your questions? You could have checked all of those
 possibilities in less time than it took to write your message ;). In
 any event if you don't get what you expect add your own inflection
 rules and then you will.

 pr (Inflector::pluralize('person')); die;

 AD


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: AclAdmin dAuth Deny

2007-10-22 Thread AD7six



On Oct 22, 7:56 pm, seacloud9 [EMAIL PROTECTED] wrote:
 How do I query the AclAdmin plugin from my app/controllers/
 post_controller...?

You don't. The plugin is only for administering acl objects.

However what you can do is move the ac component to your app and
include it in your app_controller. I can't remember if the ac
component has any dependencies (view files and maybe some methods in
the plugin app controller) if so move them too. When set up correctly
just be including the component there will be automatic ACL checks
based on the logged in user (or public user) and the aco corresponding
to the url or it's sudo parent(s) if a specific ACO doesn't exist.

hth,

AD


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



dynamic db connection | $useDbConfig

2007-10-22 Thread carSign

Is there a way to change the config variables inside my model on the
fly.

For example.  If a user visits:

http://www.example.com/videos/rent/toy_story

the page will be returned as normal.  But if a user visits,

http://www.example.com/videos_qa/rent/toy_story or something like it

I want to use the same model, view, and controller but change the
value of $useDbConfig in the model to use a QA database?
Is there a good way to do this.  I want to have both available.  The
only difference in the page that will be seen by the user will be if
the data in the database is different.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: dynamic db connection | $useDbConfig

2007-10-22 Thread rtconner

http://api.cakephp.org/1.2/class_model.html#d45dbbc6a13d9921731abf738623bb01

On Oct 22, 2:24 pm, carSign [EMAIL PROTECTED] wrote:
 Is there a way to change the config variables inside my model on the
 fly.

 For example.  If a user visits:

 http://www.example.com/videos/rent/toy_story

 the page will be returned as normal.  But if a user visits,

 http://www.example.com/videos_qa/rent/toy_storyor something like it

 I want to use the same model, view, and controller but change the
 value of $useDbConfig in the model to use a QA database?
 Is there a good way to do this.  I want to have both available.  The
 only difference in the page that will be seen by the user will be if
 the data in the database is different.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: About the definition of 'singular' and 'plural' in naming conventions

2007-10-22 Thread skyblueink

Thansk! I'll check out inflection.php.

On 10월23일, 오전5시16분, Wayne Fay [EMAIL PROTECTED] wrote:
 The plural/singular code is in the Inflector class, under cake/libs.
 And as AD76 added, you can add your own rules by editing
 app/config/inflections.php.

 Wayne

 On 10/22/07, AD7six [EMAIL PROTECTED] wrote:





  On Oct 22, 9:44 pm, skyblueink [EMAIL PROTECTED] wrote:

  snip
  Did you try any of your questions? You could have checked all of those
  possibilities in less time than it took to write your message ;). In
  any event if you don't get what you expect add your own inflection
  rules and then you will.

  pr (Inflector::pluralize('person')); die;

  AD- 따온 텍스트 숨기기 -

 - 따온 텍스트 보기 -


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Latest Releases not available for download

2007-10-22 Thread DanielMedia

Also, the link to read the announcement doesn't work either. Just a
heads up.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Latest Releases not available for download

2007-10-22 Thread Gwoo

Sorry for the confusion. An announcement will be made when the release
is available.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



I'm a CakePHP Crack Head

2007-10-22 Thread DanielMedia

As awesome as CakePHP is, it does have a weird side effect. When
you're trying to find information about certain features or specific
documentation, its so scarce that it can make you feel like a crack
head looking for a fix. Man... I'll suck yo d**k for an explanation
of how this CakePHP feature works. lol...

*Zip*

Ahhh... So thats how the form helper works...

On a side note, I just found the CakePHP podcasts. Nice... Hopefully
they'll get even better as time goes on.

http://live.cakephp.org/

: )


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: I'm a CakePHP Crack Head

2007-10-22 Thread John David Anderson (_psychic_)


On Oct 22, 2007, at 4:31 PM, DanielMedia wrote:


 As awesome as CakePHP is, it does have a weird side effect. When
 you're trying to find information about certain features or specific
 documentation, its so scarce that it can make you feel like a crack
 head looking for a fix. Man... I'll suck yo d**k for an explanation
 of how this CakePHP feature works. lol...

 *Zip*

 Ahhh... So thats how the form helper works...

 On a side note, I just found the CakePHP podcasts. Nice... Hopefully
 they'll get even better as time goes on.

So were you looking for something in particular, or is this crude  
message just a vague complaint?

?,

-- John

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Weird missing action error

2007-10-22 Thread Grant Cox

Post your controller source on http://bin.cakephp.org/ , and post the
url back here.


On Oct 23, 3:55 am, Steveston [EMAIL PROTECTED] wrote:
 Everything worked properly last week. I did some changes and, for
 somehow, the application did not work properly anymore.

 I have two forms in my view page:

 echo $html-formTag(/users/listUsers);
 echo $html-formTag(/users/searchUsers);

 Consequently, I have two methods in the controller:

 function listUsers()
 function searchUsers()

 When submitting the search user form, everything is fine
 But when submitting the list user form, I get:

 You are seeing this error because the action listUsers  is not defined
 in controller UsersController

 Notice: this error is being rendered by the app/views/errors/
 missing_action.tpl.php view file, a user-customizable error page for
 handling invalid action dispatches.

 Fatal: Create Method:

 ?php
 class UsersController extends AppController
 {
 function listUsers()
 {

 }
 }
 ?

 in file : app\controllers\users_controller.php

 Error: Unable to execute action listUsers in UsersController

 I do have listUsers in the controller.

 What happened?

 Thanks,


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Hiring CakePHP Developers

2007-10-22 Thread Sebastian Macias

Guys,

We need to hire 2-3 developers to work in house at our San Diego/
Solana Beach office or remotely. Please checkout the job description
and send me an email if you are interested:

http://sandiego.craigslist.org/eng/454040216.html

If you have contributed to CakePHP that's a plus.

Thanks,

Sebastian Macias
CTO
Positive Digital Solutions


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



New CakePHP Releases

2007-10-22 Thread Larry E. Masters aka PhpNut
We have some new releases available for download. Version 1.1.18.5850 [1] is
a bug fix update to the current stable release. Version 1.2.0.5875 pre-beta
[2] is the pre beta release of the current development version.

We decided to have pre beta since a lot of new features have been added
since the last alpha release. There are still some new features to
implement, so we are holding the beta release until all the enhancement
tickets are closed. This release took a little bit longer than expected, but
we say it was worth the wait.

As usual, this release includes hundreds of minor fixes, enhancements, and
speed improvements.  This release also includes several major feature
additions, which we've been working hard on to implement so CakePHP remains
the best framework for web application development in PHP.

A number of important features were added to improve support for
implementing web services, including simplified REST routing, i.e.:

Router::mapResources('posts');

This will map each HTTP request to it's corresponding controller method
(index, view, add, edit or delete).  For example, a PUT request to /posts/1
maps to the edit() method of PostsController.  In addition, the Router now
supports a whole range of HTTP header detection options.  Controlling access
to your web services is easier than ever, too.  The Security component now
supports HTTP basic and digest authentication, which is easily configurable
in your controller's beforeFilter() method.

The Auth component has also undergone extensive refactoring, making it
possible for you to plug in your own custom login authentication method or
access control system.

In the first of several major changes to the Model, findCount() and
findAll() are being replaced by the new find() syntax.  This new syntax
allows you to specify parameters as an array, like the following:

Post-find('count', array('conditions' = array('Post.comments_count' = '
20'));
Post-find('first', array('conditions' = array('Post.comments_count' = '
20'), 'order' = 'Post.date ASC'));
Post-find('all', array('limit' = 10, 'order' = 'Post.date ASC'));

Pagination flexibility has also been improved with the addition of
Model::paginate(), and Model::paginateCount(), which you can define in your
models to handle custom pagination.  Each method takes the same parameters
as findAll() and findCount(), respectively.

Also in the database department, schema generation has been implemented for
several databases.  Schema generation allows you to create and edit your
database schemas with your favorite tool, and Cake's schema tools will
manage the changes for you.

In an ongoing effort to improve the flexibility of Cake's (minimalistic)
configuration, most of the constants in core.php have been migrated to
settings in the Configure class.  Check out the latest version of
core.phpand update your app's configuration accordingly.  To help you
identify the
settings that should be changed, friendly warning messages have been added
to point you in the right direction.

In addition to code, the docs team has been hard at work over the past few
months improving the documentation, and along with this release, we're now
ready to unveil the pre-beta version of the CakePHP 1.2 manual, at
http://tempdocs.cakephp.org/.  There are still many things missing, but if
you find any errors, please submit documentation tickets.

And last but certainly not least, significant work has done to lay the
foundation for full, PHP-native Unicode support in CakePHP. This means we do
not have to wait for PHP6 to make it possible to fully internationalize your
PHP application on any platform, independent of installed extensions.

With all these new features, we hope you agree that CakePHP 1.2 pre-beta was
worth the wait.  This will be the last release before the 1.2 API is fully
stabilized, and we can't wait for you to try it.

[1] Download 1.1.18.5850:
http://cakeforge.org/frs/?group_id=23release_id=343
1.1.x.x change long: https://trac.cakephp.org/wiki/changelog/1.1.x.x

[2] Download 1.2.0.5875 pre-beta:
http://cakeforge.org/frs/?group_id=23release_id=344
1.2.x.x change log: https://trac.cakephp.org/wiki/changelog/1.2.x.x

-- 
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access  public
*/

--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



How to Retrieve Query() Results

2007-10-22 Thread Cheeze

Hi,

I have some questions on getting results of a query function call.

E.g.

$this-ProductsUsers-query(UPDATE `products_users` SET
`modified`=NOW() WHERE `product_id`='{$pid}' AND `user_id`='{$uid}');

How do I know whether the operation completed with any errors? E.g.
whether this statement created any errors or was it successful?

I checked the return value of query(). But because it is not a SELECT
call, nothing is returned i.e. the array is empty.

I checked getNumRows() but it returned 0 even if the operation was
completed successfully.

The above statement is made in the ProductsController. I created a
model for the join table because I store some attributes in the join
table. I then gave ProductsController access to the ProductsUsers
model using:
$uses = array('Product', 'ProductsUsers')

I'm using Cake 1.1

Thanks in advance!


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to configure apache ?

2007-10-22 Thread dardosordi

You should ask in apache forums.

Anyway, what are the errors that apache throw when restarting?

On Oct 21, 3:17 pm, Daniel [EMAIL PROTECTED] wrote:
 I am unsure about the Configuring Apache and mod_rewrite part of the
 manual.

 I can do AllowOverride is set to All

 Make sure you are editing the system httpd.conf rather than a user-
 or site-specific httpd.conf.
 There are two conf files one in conf the other in conf/default
 Which to edit ?

 Make sure you are loading up mod_rewrite correctly! You should see
 something like LoadModule rewrite_module libexec/httpd/mod_rewrite.so
 and AddModule mod_rewrite.c in your httpd.conf
 I uncommected the LoaModule command, but after adding the other two
 lines apache would not start.

 That is asfar as i got.
 What now ?

 Thanks.


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: New CakePHP Releases

2007-10-22 Thread Grant Cox

Thanks Larry, and the rest of the CakePHP team - you guys rock.  I
think everyone will agree that all of these features are definitely
making the wait for 1.2 worthwhile.  I generally keep close to the
1.2.x branch, but there are so many awesome features here that I am
yet to use - you guys are really over-delivering!

I think it's about time I made a donation!


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: About a mysql query

2007-10-22 Thread dardosordi

You can try putting 'SUBSTRING_INDEX(content,  , 20) AS
Announcement.teaser'

On Oct 22, 6:06 am, grigri [EMAIL PROTECTED] wrote:
 Model::findAll() only indexes fields that are present in the database;
 anything else is returned as you see (numeric index).

 You can write an afterFind() callback in your model to insert the
 fields into the correct positions.

 On Oct 19, 11:15 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:

  Hey,

  I am trying to do this:
  $this-set('announcements', $this-Announcement-findAll(null,
  array('id', 'name','SUBSTRING_INDEX(content,  , 20) AS teaser',
  'pic_filename'), 'add_date DESC'));

  and it doesn't work properly ..

  here is part of the dump of the resulting object:
  array(2) {
  [Announcement]=
  array(3) {
[id]=
string(1) 2
[name]=
string(18) Stire senzationala
[pic_filename]=
string(8) nicu.jpg
  }
  [0]=
  array(1) {
[teaser]=
string(7) content
  }
}

  Any help would be apreciated!

  Thx


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: 1.2.x manual

2007-10-22 Thread dardosordi

?php echo $form-create('Thingy', array('url' = array('controller'
= 'stuffs', 'action' = 'someAction'))); ?

On Oct 2, 11:52 am, macasek [EMAIL PROTECTED] wrote:
 Thank you!

 I was hoping it was avaliable because I wanted to see an example of
 using a helper to create a form tag. There appears to be 2 ways,
 AjaxHelper and FormHelper. The Ajax::form is all about ajax submission
 and the Form::create appears to only allow you to set the model and
 then it assumes the method to call is add.

 I am currently porting a 1.1.x app and am looking for a creation
 mechanism similar to the old Html:formTag which allows you to set the
 entire action.  Is there anything in 1.2.x that is that flexible? Or
 do I need to resort to the manual creation of form tags?

 Thanks again!

 On Oct 2, 10:40 am, John David Anderson (_psychic_)

 [EMAIL PROTECTED] wrote:
  On Oct 2, 2007, at 8:17 AM, macasek wrote:

   I see there is a 1.2.x api but is there also a manual under
   development?

  Yep. It's nearing 150 printed pages, and an initial version is
  already under review by the core development and documentation teams.

  Stay tuned.

  -- John


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Security Component HTTP digest authentication

2007-10-22 Thread jcsiegrist

Hi everyone,

I'm trying to use the Security HTTP authentication features. While I
can get basic authentication to work, I just can't get digest to work.
I'm using 1.2r5879.

I use this call to the Security component in the beforeFilter of my
AppController

$this-Security-requireLogin('*', array('users' = array('admin' =
'bb5fd3344ae62a91d6aee3947fca'), 'type'='digest',
'realm'='admin'));

I've tried also md5 hashing the username, but that didn't make any
difference. I'm guessing that I need to be doing something different
to my stored hash of the password and/or username. Can someone point
me in the right direction? Thank You.

:jc


--~--~-~--~~~---~--~~
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 this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---