[ic] Profile looping problem...

Dan Browning interchange-users@icdevgroup.org
Fri Dec 6 20:47:00 2002


At 04:02 PM 12/6/2002 -0800, you wrote:
> > At 09:32 AM 12/6/2002 -0800, you wrote:
> > >At 12:12 PM 12/06/2002 -0500, you wrote:
> > >>When someone attempts to "place order" it appears just to
> > reload the same
> > >>screen.
> > >>
> > >>The error message in the error log is:
> > >>
> > >>Order profile credit_card not found
> > >
> > >The profiles.order file is probably contaminated with
> > carriage returns, I
> > >have seen that cause this kind of behavior before, and the
> > same goes for
> > >catalog.cfg for that matter. You can strip them out with
> > command-line Perl:
> > >
> > >perl -i -p -e 's/\r//g' path/to/file
> >
> > Here's a second example that recurses through the entire
> > directory tree.
> >
> > find . -exec perl -pi -e 's/\r\n/\n/g' {} \;
>
>
>And after a terrible terrible night of trying to restore one of my sites
>I would like to add:
>
>        - BE EXTRA CAREFULL when doing ANYTHING recursively -

True.  Particularly with the example I gave, you probably don't want to run 
that on binary files, since \r\n may match some sequence in the binary file 
(like a GDBM file).  Of course, you could tell find to exclude binary files 
but... the moral is that one should always be careful.  :-)

--
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
| Dan Browning, Kavod Technologies,      <dan.browning@kavod.com> |
| 6700 NE 162nd Ave, Suite 210, Vancouver, WA (360) 843-4074 x217 |
\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
A person is just about as big as the things that make them angry.