For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > February 2008 > Re: [PEAR] HTML_Template_Sigma abort after 8192 chars









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR] HTML_Template_Sigma abort after 8192 chars
Mario Gzuk

2008-02-22, 4:15 am

I have found the right hint in the php docu:
fread() reads up to length bytes from the file pointer referenced by
handle . Reading stops as soon as one of the following conditions is
met:
....
* 8192 bytes have been read (after opening userspace stream)

See also:
http://bugs.php.net/bug.php?id=37158

Here is a diff on Sigma.php which fixes this issue on affected systems:

1232,1235c1232
< $content="";
< while (!feof($fh)) {
< $content.=fgets($fh, 32768);
< }
---
> $content = fread($fh, max(1, filesize($filename)));



greetings mario

Am Donnerstag, den 21.02.2008, 17:18 +0100 schrieb Mario Gzuk:
> Hi,
> if I use a templatefile which is bigger than 8192 byte all data after
> that get lost. I only have this problem on a SLES10 machine and I think
> it is only a wrong php setting but I cant find any difference. Maybe
> someone knows the solution of this problem?
>
> Thank you for the great work.
>
> greetings mario
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com