Thursday, October 28, 2010

Re: Empty records in database

On Oct 25, 11:56 pm, ervin <ervin.ho...@gmail.com> wrote:
> Hi,
>
> i've used cake for several websites and i never had such a problem.
>
> Now one of my websites is an online car selling website when users can
> signup and post their cars for sale.
>
> It's about a couple of weeks that every day i find some empty posts
> (empty DB records) in my web site. Normally this should not be
> possible as, of course, i have an ACL control over the methods that
> are accessible to the users. Also when a user posts something this is
> stored in th DB along with the user id and for those posts the user id
> is set to 0.
> I have also tried to log the ip of the user that inserts a post
> through the add action but for those posts the ip is empty.
> So im quite sure that those records are not coming through the add
> method

why don't you put your tracking in the model. e.g.

function beforeSave() {
if (!array_filter($this->data[$this->alias])) {
$this->log($_SERVER);
$this->log(Debugger::trace());
}
return true;
}

Most likely the symptoms you describe stem from an application error.

AD

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: