Re: No validation after deploy

2010-05-21 Thread Nicolas Maleve
I had a similar problem once with a validation rule.
It was due to the difference of PHP versions between my dev environment
(php5) and the production environment (php4)
Upgrading the production environment to php5 was the solution, but it
isn't always possible.

,n
Le Ven 21 mai 2010 9:08, Matteo a écrit :
> Hi Andrei,
>
> the "model" one, please see below:
>
> class Latest extends AppModel
> {
> var $name = 'Latest';
>
> var $validate = array(
>   'title' =>  array('rule' => 'notEmpty', 'message' =>
> 'mandatory field'),
>   'body' =>  array('rule' => 'notEmpty', 'message' =>
> 'mandatory field')
> );
> }
>
> How is it possible it works on my Mac and not online??
>
> Thank you
>
> Matteo
>
> On May 21, 8:48 am, Andrei Mita  wrote:
>> Do you use model validation or a custom made one?
>>
>>
>>
>>
>>
>> On Thu, May 20, 2010 at 9:58 PM, Matteo  wrote:
>> > Hi all,
>>
>> > hope you can help a very newbe one.
>>
>> > I have a very simple form with two fields: title and body.
>>
>> > In my dev enviroment I check for the two fields to be fill.
>> > Validation works fine, if the fields are left blank, it shows the
>> > message error.
>>
>> > The problem is with deploy. In my deploy env. (dreamhost) if I leave
>> > the fields blank it submits the same!!
>>
>> > Have you ever experienced anything similar??
>>
>> > Can't find a solution.
>>
>> > A case similar to that can be due to .htaccess configuration?
>>
>> > I can't think at any other couses!!
>>
>> > Working with 1.2.7 V.
>>
>> > Thanx a lot
>>
>> > Matteo
>>
>> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help
>> others
>> > with their CakePHP related questions.
>>
>> > You received this message because you are subscribed to the Google
>> Groups
>> > "CakePHP" group.
>> > To post to this group, send email to cake-php@googlegroups.com
>> > To unsubscribe from this group, send email to
>> > cake-php+unsubscr...@googlegroups.com> om>For more options, visit this group at
>> >http://groups.google.com/group/cake-php?hl=en
>>
>> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
>> with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google
>> Groups "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com For more options, visit this group
>> athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>


 *
*
  *
  *
   *
 *
   *
  *
  *
  C O N S T A N T
   V Z W




Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: sanitize and redirect

2010-02-12 Thread Nicolas Maleve
Thanks. If I get the principle right, there are two moments where
sanitizing must take place:
- before sending parameters in custom queries
- before output in the views with h()

,n
Le Jeu 11 février 2010 19:48, anl hp a écrit :
> Not you don't ... because you should not worry about that, if an id is
> invalid and you want handle the situation elegant, you could do something
> like this:
> if (!is_numeric($id)) {
>   $this->setFlash('ooopss, dont do that!');
>   $this->redirect();
> }
>
>
> anl
>
>
> On Thu, Feb 11, 2010 at 7:05 PM, Nicolas Maleve
> wrote:
>
>> Hello,
>>
>> Just a doubt. It looks like Cake takes care of sanitizing data in save
>> and
>> find, ie. Do I need to sanitize $id when using
>> $this->redirect(array('action'=>'edit','id'=>$id)); Or is there some
>> cleaning happening inside redirect?
>>
>> Thanks
>>
>> nicolas
>>
>>
>> *
>>*
>>  *
>>  *
>>   *
>> *
>>   *
>>  *
>>  *
>>  C O N S T A N T
>>   V Z W
>>
>>
>>
>>
>> Check out the new CakePHP Questions site http://cakeqs.org and help
>> others
>> with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google
>> Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.comFor
>> more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>


 *
*
  *
  *
   *
 *
   *
  *
  *
  C O N S T A N T
   V Z W




Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


sanitize and redirect

2010-02-11 Thread Nicolas Maleve
Hello,

Just a doubt. It looks like Cake takes care of sanitizing data in save and
find, ie. Do I need to sanitize $id when using
$this->redirect(array('action'=>'edit','id'=>$id)); Or is there some
cleaning happening inside redirect?

Thanks

nicolas


 *
*
  *
  *
   *
 *
   *
  *
  *
  C O N S T A N T
   V Z W




Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en