Re: Bug #20460 (Feature Request)
| From: | Moriyoshi Koizumi | Date: | Wed, 27 Nov 2002 20:24:15 +0000 |
| Subject: | Re: Bug #20460 (Feature Request) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-91829@lists.php.net to get a copy of this message | ||
Derick Rethans <derick@php.net> wrote:
> On Wed, 27 Nov 2002, Sara Pollita Golemon wrote:
>
> > User complains that maximum length of a line used by fscanf is too short
> > (he has lines > 1600 chars). Looking at file.h I agree (it's only 512).
> >
> > The user requested two options:
> >
> > 1) Add an optional length field.
> > No way to do that without breaking parameter list. :(
>
> We can't really do that, users will get pissed :)
>
> >
> > 2) Increase to a larger arbitrary number.
> > This simply has the problem that it may prove too short eventually as well.
>
> Yeah, IMO it doesn't solve anything.
>
> >
> > Plus I came up with a third option:
> >
> > 3) Create an .ini entry to specify the maximum length used.
> > I think this has the best overall return on it.
>
> I don't like us adding a new ini entry for this, I think we should try
> another option:
>
> 4) Make sure we can use fscanf on a dynamically sized buffer. This will
> definitely the hardest solution, but also the most beautiful one.
I like this fourth option, because the internal scanf function will anyway
need reimplementation since it's not binary safe.
Moriyoshi
> Derick
>
> --
>
> -------------------------------------------------------------------------
> Derick Rethans
> http://derickrethans.nl/
> PHP Magazine - PHP Magazine for Professionals
> http://php-mag.net/
> -------------------------------------------------------------------------
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>