Re: Saving multiple records to multiple models

2011-08-21 Thread WebbedIT
Difficult to call without seeing more of the source code.

I assume you call a different function to save the EventComment as the
one you've shown appears to be for saving EventTransaction, if this is
a universal save method why does it's name reference Transactions?

Does your debugger register that you are in fact looping through the
full data array, do you have debug turned on in cake and is it
attempting to run the save at all?

HTH, Paul.

On Aug 21, 3:58 am, Greg Skerman gsker...@gmail.com wrote:
 Ok that worked to a degree :)

 my array now looks like this:

 Array
 (
     [1] = Array
         (
             [Event] = Array
                 (
                     [event_type_id] = 2
                 )

             [EventTransaction] = Array
                 (
                     [inventory_type_id] = 2867
                     [amount] = 123123
                 )

         )

     [2] = Array
         (
             [Event] = Array
                 (
                     [event_type_id] = 3
                 )

             [EventComment] = Array
                 (
                     [comment] = asdasd
                 )

         )

 )

 And I'm throwing the whole thing against a function which does this:

         function saveTransactionEvent($data) {
             foreach ($data as $row) {
                 Debugger::dump($row);
                 $this-saveAll($row);
             }
         }

 The first entry gets successfully saved, the second one doesn't even run..

 Both child models are bound to the Event model like this:
         $this-Event-bindModel(
                 array('hasOne' = array('EventTransaction',
 'EventComment')), false
                 );

 So they should be bound for the remainder of the request - but the
 EventComment, and its parent event never get saved

 I've scaffolded an EventComment controller, and that will write a
 comment fine... any reason why its not working in this context?







 On Sun, Aug 21, 2011 at 4:09 AM, WebbedIT p...@webbedit.co.uk wrote:
  A good related blog post from teknoid:

 http://nuts-and-bolts-of-cakephp.com/2009/03/26/saveall-with-multiple...

  --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
  others with their CakePHP related questions.

  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group
  athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Saving multiple records to multiple models

2011-08-21 Thread Greg Skerman
found the problem...
EventComment had a validation rule on event_id being numeric... seemed to
work when the relationship was defined as hasMany but fell over when it was
hasOne.

removed the validation rule (input never entered into a user form anyway),
and it seems to be working fine now.

thanks for your help, the array structure works a treat.


On Sun, Aug 21, 2011 at 5:02 PM, WebbedIT p...@webbedit.co.uk wrote:

 Difficult to call without seeing more of the source code.

 I assume you call a different function to save the EventComment as the
 one you've shown appears to be for saving EventTransaction, if this is
 a universal save method why does it's name reference Transactions?

 Does your debugger register that you are in fact looping through the
 full data array, do you have debug turned on in cake and is it
 attempting to run the save at all?

 HTH, Paul.

 On Aug 21, 3:58 am, Greg Skerman gsker...@gmail.com wrote:
  Ok that worked to a degree :)
 
  my array now looks like this:
 
  Array
  (
  [1] = Array
  (
  [Event] = Array
  (
  [event_type_id] = 2
  )
 
  [EventTransaction] = Array
  (
  [inventory_type_id] = 2867
  [amount] = 123123
  )
 
  )
 
  [2] = Array
  (
  [Event] = Array
  (
  [event_type_id] = 3
  )
 
  [EventComment] = Array
  (
  [comment] = asdasd
  )
 
  )
 
  )
 
  And I'm throwing the whole thing against a function which does this:
 
  function saveTransactionEvent($data) {
  foreach ($data as $row) {
  Debugger::dump($row);
  $this-saveAll($row);
  }
  }
 
  The first entry gets successfully saved, the second one doesn't even
 run..
 
  Both child models are bound to the Event model like this:
  $this-Event-bindModel(
  array('hasOne' = array('EventTransaction',
  'EventComment')), false
  );
 
  So they should be bound for the remainder of the request - but the
  EventComment, and its parent event never get saved
 
  I've scaffolded an EventComment controller, and that will write a
  comment fine... any reason why its not working in this context?
 
 
 
 
 
 
 
  On Sun, Aug 21, 2011 at 4:09 AM, WebbedIT p...@webbedit.co.uk wrote:
   A good related blog post from teknoid:
 
  http://nuts-and-bolts-of-cakephp.com/2009/03/26/saveall-with-multiple.
 ..
 
   --
   Our newest site for the community: CakePHP Video Tutorials
  http://tv.cakephp.org
   Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
   others with their CakePHP related questions.
 
   To unsubscribe from this group, send email to
   cake-php+unsubscr...@googlegroups.com For more options, visit this
 group
   athttp://groups.google.com/group/cake-php

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Saving multiple records to multiple models

2011-08-21 Thread WebbedIT
Yeah, good idea to check your validationErrors array when a save
doesn't work and you're scratching your head as to what's happening :)

On Aug 21, 8:47 am, Greg Skerman gsker...@gmail.com wrote:
 found the problem...
 EventComment had a validation rule on event_id being numeric... seemed to
 work when the relationship was defined as hasMany but fell over when it was
 hasOne.

 removed the validation rule (input never entered into a user form anyway),
 and it seems to be working fine now.

 thanks for your help, the array structure works a treat.







 On Sun, Aug 21, 2011 at 5:02 PM, WebbedIT p...@webbedit.co.uk wrote:
  Difficult to call without seeing more of the source code.

  I assume you call a different function to save the EventComment as the
  one you've shown appears to be for saving EventTransaction, if this is
  a universal save method why does it's name reference Transactions?

  Does your debugger register that you are in fact looping through the
  full data array, do you have debug turned on in cake and is it
  attempting to run the save at all?

  HTH, Paul.

  On Aug 21, 3:58 am, Greg Skerman gsker...@gmail.com wrote:
   Ok that worked to a degree :)

   my array now looks like this:

   Array
   (
       [1] = Array
           (
               [Event] = Array
                   (
                       [event_type_id] = 2
                   )

               [EventTransaction] = Array
                   (
                       [inventory_type_id] = 2867
                       [amount] = 123123
                   )

           )

       [2] = Array
           (
               [Event] = Array
                   (
                       [event_type_id] = 3
                   )

               [EventComment] = Array
                   (
                       [comment] = asdasd
                   )

           )

   )

   And I'm throwing the whole thing against a function which does this:

           function saveTransactionEvent($data) {
               foreach ($data as $row) {
                   Debugger::dump($row);
                   $this-saveAll($row);
               }
           }

   The first entry gets successfully saved, the second one doesn't even
  run..

   Both child models are bound to the Event model like this:
           $this-Event-bindModel(
                   array('hasOne' = array('EventTransaction',
   'EventComment')), false
                   );

   So they should be bound for the remainder of the request - but the
   EventComment, and its parent event never get saved

   I've scaffolded an EventComment controller, and that will write a
   comment fine... any reason why its not working in this context?

   On Sun, Aug 21, 2011 at 4:09 AM, WebbedIT p...@webbedit.co.uk wrote:
A good related blog post from teknoid:

   http://nuts-and-bolts-of-cakephp.com/2009/03/26/saveall-with-multiple.
  ..

--
Our newest site for the community: CakePHP Video Tutorials
   http://tv.cakephp.org
Check out the new CakePHP Questions sitehttp://ask.cakephp.organdhelp
others with their CakePHP related questions.

To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this
  group
athttp://groups.google.com/group/cake-php

  --
  Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
  Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help
  others with their CakePHP related questions.

  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group
  athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Login security

2011-08-21 Thread nOLL
Hi,

Is there any way to create login function more security such as when
the users failed to login 3 times, they only be login after 30
minutes.

Thanks.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Login security

2011-08-21 Thread Sam Sherlock
All of 30 earth minutes?

Google 'cakephp login attempts' you'll find some bakery code and a
stackexchange post amongst others.

I would set the account inactive and require the account to be reset via
users email.

- S
On 21 Aug 2011 16:24, nOLL hasnolm...@gmail.com wrote:
 Hi,

 Is there any way to create login function more security such as when
 the users failed to login 3 times, they only be login after 30
 minutes.

 Thanks.

 --
 Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
at http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Login security

2011-08-21 Thread euromark
@sam
not a good idea

users could then block accounts of other users
a simple deadlock for a few minutes is more than enough to keep out
bot attacks or bruteforce
important is that this is done via DB (not session or anything)


On 21 Aug., 17:46, Sam Sherlock sam.sherl...@gmail.com wrote:
 All of 30 earth minutes?

 Google 'cakephp login attempts' you'll find some bakery code and a
 stackexchange post amongst others.

 I would set the account inactive and require the account to be reset via
 users email.

 - S
 On 21 Aug 2011 16:24, nOLL hasnolm...@gmail.com wrote: Hi,

  Is there any way to create login function more security such as when
  the users failed to login 3 times, they only be login after 30
  minutes.

  Thanks.

  --
  Our newest site for the community: CakePHP Video Tutorials

 http://tv.cakephp.org Check out the new CakePHP Questions 
 sitehttp://ask.cakephp.organd help

 others with their CakePHP related questions.

  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this group

 athttp://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: Login security

2011-08-21 Thread Sam Sherlock
@mark true, but they would have to know the username - which would not be
the same as 'nickname'

If the account with three failed logins required a capatcha in addition to
usr/pwd?

- S
On 21 Aug 2011 17:42, euromark dereurom...@googlemail.com wrote:
 @sam
 not a good idea

 users could then block accounts of other users
 a simple deadlock for a few minutes is more than enough to keep out
 bot attacks or bruteforce
 important is that this is done via DB (not session or anything)


 On 21 Aug., 17:46, Sam Sherlock sam.sherl...@gmail.com wrote:
 All of 30 earth minutes?

 Google 'cakephp login attempts' you'll find some bakery code and a
 stackexchange post amongst others.

 I would set the account inactive and require the account to be reset via
 users email.

 - S
 On 21 Aug 2011 16:24, nOLL hasnolm...@gmail.com wrote: Hi,

  Is there any way to create login function more security such as when
  the users failed to login 3 times, they only be login after 30
  minutes.

  Thanks.

  --
  Our newest site for the community: CakePHP Video Tutorials

 http://tv.cakephp.org Check out the new CakePHP Questions
sitehttp://ask.cakephp.organd help

 others with their CakePHP related questions.

  To unsubscribe from this group, send email to
  cake-php+unsubscr...@googlegroups.com For more options, visit this
group

 athttp://groups.google.com/group/cake-php

 --
 Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
at http://groups.google.com/group/cake-php

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


problem in updateAll

2011-08-21 Thread taqman filler
I use updateAll to change theme name
$this-Theme-updateAll(array('Theme.name' = $name),
array('Theme.user_id' = $id));
I got unknow column
this sql
UPDATE `themes` AS `Theme`  SET `Theme`.`name` = sky  WHERE
`Theme`.`user_id` = 128

thank

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


$this-Form-create doesn't work as stated

2011-08-21 Thread Jerome Tan
I have tried checking and couldn't find out what's wrong with this, or
is this a bug?

I added this line on my code..

echo $this-Form-create('Brand');

then result is:

form action=/stock/index.php/brands id=BrandIndexForm
method=post accept-charset=utf-8div style=display:none;

from the references the HTML code generated lacks add as it should
add s on the form name then add /add

Is this a bug?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Form generation miss 'add'

2011-08-21 Thread jtan1ph
Hi,

Is this a bug? Am using latest 1.3 CakePhP, running

$this-Form-create('hello')

Gives me 

Usual html form with action calling 'hellos' instead of 'hellos/add' as 
mentioned in most manuals and books.

Thanks.

Regards,
Jerome

Sent from my BlackBerry® wireless handheld

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


send POST data to a controller cause a 404!

2011-08-21 Thread 3p3r
Hi all.
I have a no Model/View controller and i'm trying to send data to it
from a form with POST method. the form is not editable cuz it's not
mine. it's in another website. when I navigate to this public function
via URL, everything is fine. but when I try to send data to it, it'll
give me a 404 error. anyone knows how to deal with this issue?
here is the form:

form accept-charset=utf-8 method=post action=/remitments/
testPOST
... some inputs
/form


and here is the controller function:

function testPOST()
{
$this-disableCache();
$this-layout = 'none';
$this-autoRender = false;
echo pre;
print_r($_POST);
echo /pre;
}


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


What is the proper way of testing controllers in CakePHP 2.0

2011-08-21 Thread Christophe Roblin
Hi,

I've tried searching the new docs about testing with the new PHPUnit
for CakePHP 2.0 Beta, without any success
Below is my code for testing the admin action of controller posts with
method add.

My issue is that I expected from the docs I received that headers were
set when using testAction, it is always blank

public function testAdminAdd() {
$Posts = $this-generate('Posts', array(
'components' = array(
'Session'
)
)
);

$Posts-Session-expects($this-once())-
method('setFlash');



$this-testAction('/admin/posts/add', array(
'data' = array(
'Post' = array('name' = 'New Post')
)
)
);
   // debug($this);
$this-assertEquals($this-headers['Location'], '/admin/
posts/index');
$this-assertEquals($this-vars['post']['Post']['name'],
'New Post');

$this-assertPattern('/html/', $this-contents);
$this-assertPattern('/form/', $this-view);

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: $this-Form-create doesn't work as stated

2011-08-21 Thread Tilen Majerle
For me it's working well..
Actually...this is maybe because you are not using .htaccess...i didn't
check this !


Which cake version?
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/8/21 Jerome Tan jtan...@gmail.com

 I have tried checking and couldn't find out what's wrong with this, or
 is this a bug?

 I added this line on my code..

 echo $this-Form-create('Brand');

 then result is:

 form action=/stock/index.php/brands id=BrandIndexForm
 method=post accept-charset=utf-8div style=display:none;

 from the references the HTML code generated lacks add as it should
 add s on the form name then add /add

 Is this a bug?

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: send POST data to a controller cause a 404!

2011-08-21 Thread Tilen Majerle
controller method should be underscored, so test_p_o_s_t or idk: test_post
--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/8/21 3p3r 3pehr.l...@gmail.com

 Hi all.
 I have a no Model/View controller and i'm trying to send data to it
 from a form with POST method. the form is not editable cuz it's not
 mine. it's in another website. when I navigate to this public function
 via URL, everything is fine. but when I try to send data to it, it'll
 give me a 404 error. anyone knows how to deal with this issue?
 here is the form:
 
 form accept-charset=utf-8 method=post action=/remitments/
 testPOST
 ... some inputs
 /form
 

 and here is the controller function:
 
 function testPOST()
 {
$this-disableCache();
$this-layout = 'none';
$this-autoRender = false;
echo pre;
print_r($_POST);
echo /pre;
 }
 

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: send POST data to a controller cause a 404!

2011-08-21 Thread Sepehr Laal
yeah but you do know that this doesn't make a different!

On Sun, Aug 21, 2011 at 11:53 PM, Tilen Majerle tilen.maje...@gmail.comwrote:

 controller method should be underscored, so test_p_o_s_t or idk: test_post
 --
 Lep pozdrav, Tilen Majerle
 http://majerle.eu



 2011/8/21 3p3r 3pehr.l...@gmail.com

 Hi all.
 I have a no Model/View controller and i'm trying to send data to it
 from a form with POST method. the form is not editable cuz it's not
 mine. it's in another website. when I navigate to this public function
 via URL, everything is fine. but when I try to send data to it, it'll
 give me a 404 error. anyone knows how to deal with this issue?
 here is the form:
 
 form accept-charset=utf-8 method=post action=/remitments/
 testPOST
 ... some inputs
 /form
 

 and here is the controller function:
 
 function testPOST()
 {
$this-disableCache();
$this-layout = 'none';
$this-autoRender = false;
echo pre;
print_r($_POST);
echo /pre;
 }
 

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




-- 
**
*


*

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: send POST data to a controller cause a 404!

2011-08-21 Thread Tilen Majerle
ok, check form action,
have you enabled Security component...?...this could be a problem

--
Lep pozdrav, Tilen Majerle
http://majerle.eu



2011/8/21 Sepehr Laal 3pehr.l...@gmail.com

 yeah but you do know that this doesn't make a different!

 On Sun, Aug 21, 2011 at 11:53 PM, Tilen Majerle 
 tilen.maje...@gmail.comwrote:

 controller method should be underscored, so test_p_o_s_t or idk: test_post
 --
 Lep pozdrav, Tilen Majerle
 http://majerle.eu



 2011/8/21 3p3r 3pehr.l...@gmail.com

  Hi all.
 I have a no Model/View controller and i'm trying to send data to it
 from a form with POST method. the form is not editable cuz it's not
 mine. it's in another website. when I navigate to this public function
 via URL, everything is fine. but when I try to send data to it, it'll
 give me a 404 error. anyone knows how to deal with this issue?
 here is the form:
 
 form accept-charset=utf-8 method=post action=/remitments/
 testPOST
 ... some inputs
 /form
 

 and here is the controller function:
 
 function testPOST()
 {
$this-disableCache();
$this-layout = 'none';
$this-autoRender = false;
echo pre;
print_r($_POST);
echo /pre;
 }
 

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




 --
 **
 *

 
 *

  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: send POST data to a controller cause a 404!

2011-08-21 Thread Sepehr Laal
yes, i've enabled the security component. something interesting! when I
delete [_token][fields] and [_token][key] it won't throw a 404 so I think
the main problem is from these security stuff.

On Mon, Aug 22, 2011 at 12:27 AM, Tilen Majerle tilen.maje...@gmail.comwrote:

 ok, check form action,
 have you enabled Security component...?...this could be a problem

 --
 Lep pozdrav, Tilen Majerle
 http://majerle.eu



 2011/8/21 Sepehr Laal 3pehr.l...@gmail.com

 yeah but you do know that this doesn't make a different!

 On Sun, Aug 21, 2011 at 11:53 PM, Tilen Majerle 
 tilen.maje...@gmail.comwrote:

 controller method should be underscored, so test_p_o_s_t or idk:
 test_post
 --
 Lep pozdrav, Tilen Majerle
 http://majerle.eu



 2011/8/21 3p3r 3pehr.l...@gmail.com

  Hi all.
 I have a no Model/View controller and i'm trying to send data to it
 from a form with POST method. the form is not editable cuz it's not
 mine. it's in another website. when I navigate to this public function
 via URL, everything is fine. but when I try to send data to it, it'll
 give me a 404 error. anyone knows how to deal with this issue?
 here is the form:
 
 form accept-charset=utf-8 method=post action=/remitments/
 testPOST
 ... some inputs
 /form
 

 and here is the controller function:
 
 function testPOST()
 {
$this-disableCache();
$this-layout = 'none';
$this-autoRender = false;
echo pre;
print_r($_POST);
echo /pre;
 }
 

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and
 help others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this
 group at http://groups.google.com/group/cake-php


  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




 --
 **
 *

 
 *

  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php


  --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




-- 
**
*


*

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP beginner having trouble setting up .htaccess files with 1and1.com server config

2011-08-21 Thread Seth Barrett
When I add that I get error 500 page.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: CakePHP beginner having trouble setting up .htaccess files with 1and1.com server config

2011-08-21 Thread Seth Barrett
Tried these tweaks to no avail... Still getting the following error but no
500 error on the page:

*URL rewriting is not properly configured on your server.*


On Fri, Aug 19, 2011 at 3:38 PM, andrewperk andrewp...@gmail.com wrote:

 I use 1and1 as well and I found that I need to include a forward slash
 and define where the app folder is as well in the path. My cake app is
 installed in my root folder.

 Here's my root .htaccess:

 IfModule mod_rewrite.c
   RewriteEngine on
RewriteRule^$ /app/webroot/[L]
   RewriteRule(.*) /app/webroot/$1 [L]
 /IfModule

 root/app/ .htaccess

 IfModule mod_rewrite.c
RewriteEngine on
 RewriteRule^$/app/webroot/[L]
RewriteRule(.*) /app/webroot/$1[L]
  /IfModule

 root/app/webroot .htaccess

 IfModule mod_rewrite.c
RewriteEngine On
 RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^(.*)$ /app/webroot/index.php?url=$1 [QSA,L]
 /IfModule

 Only things to notice are is that the paths always include the app
 folder and they all have the beginning / added to them. Works for me.

 Good luck.

 On Aug 19, 5:26 am, Seth Barrett lighthouseinnovati...@gmail.com
 wrote:
  Hello,
 
  I'm attempting to get my first CakePHP installation running on a 1and1
  server configuration. I've read all the articles and thought I was
  doing everything properly but the results don't seem to indicate
  that.
 
  The domain is here:http://bourbonbeachjerk.com/
 
  You can see the error on URL rewriting is still present.
 
  I've got the .htaccess files in all three directories and have
  followed instructions here:
 http://book.cakephp.org/view/37/Apache-and-mod_rewrite-and-htaccess
 
  And here:http://stackoverflow.com/questions/1334746/htaccess-for-cakephp
 
  And some others which show similar info.
 
  Nothing is working. I either get error 500's or Eternal Server Error
  or the page loads with the same error present. I'm starting to feel
  like giving up and the 1and1 support keeps sending me a link to the
  same page Tutorial (the first one I posted above).
 
  One thing I'm unsure of is that my zip didn't seem to come with
  any .htaccess files. I'm wondering if there are some examples as I've
  just got the elements suggested in the articles in mine.
 
  Currently its like this.
 
  Root .htaccess -
 
  AddType x-mapp-php5 .php
  IfModule mod_rewrite.c
  RewriteBase /homepages/32/d183679463/htdocs/cakephp/
  RewriteRule ^$ app/webroot/ [L]
  RewriteRule (.*) app/webroot/$1 [L]
  /ifmodule
 
  root/app -
 
  IfModule mod_rewrite.c
  RewriteEngine on
  RewriteBase /homepages/32/d183679463/htdocs/cakephp/
  RewriteRule ^$ /webroot/ [L]
  RewriteRule (.*) /webroot/$1 [L]
  /IfModule
 
  root/app/webroot/ -
 
  IfModule mod_rewrite.c
  RewriteEngine On
  RewriteBase /homepages/32/d183679463/htdocs/cakephp/
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
  /IfModule
 
  What am I doing wrong? It must be something. Keep in mind this is all
  I have in the .htaccess files. There is nothing else as I started with
  blank text pages. Any direction would be greatly appreciated.

 --
 Our newest site for the community: CakePHP Video Tutorials
 http://tv.cakephp.org
 Check out the new CakePHP Questions site http://ask.cakephp.org and help
 others with their CakePHP related questions.


 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php




-- 
lighthouse http://lighthouseinnovations.ca
strategy, creative, development

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


How to add variable to $html-css();

2011-08-21 Thread taqman filler
first I try this
 echo $this-Html-css(array('jquery.ui.theme','reset','text','grid','votes',
  $theme[0]['Theme']['name']));
doesn't work
how to make the right way

thank
taqman

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php