Re: fread() memory problems
| From: | Peter Ford | Date: | Mon, 16 Nov 2009 09:13:03 +0000 |
| Subject: | Re: fread() memory problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299862@lists.php.net to get a copy of this message | ||
Ashley Sheridan wrote:
Ashley Sheridan wrote:
> I was just wondering why fread() seems to use so much memory when
> reading in a file. My php.ini has a script memory limit of 32MB, yet PHP
> hits its memory limit on a 19MB mbox file that I'm reading in. How is it
> possible that this function can use 150% of a files' size in memory?!
>
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
Is it possible that the file is 8-bit characters and your PHP implementation is
converting it to 16-bit characters?
I'm not sure what settings would be involved for that, but no-one else has
responded so I thought a vague idea might be better than nothing!
--
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent