I have already upped php.ini "memory_limit" to 2500Mb.
Michael
Do you have any idea what could be causing this then please?
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 2023545829 bytes) in /www/scan.php on line 145
Line 145 is a call to fread()
Kind regards,
Michael
Yes, like that.
> Will read the whole thing into memory, which is not something you
> really want to do as previously noted
Well, the system does have 4Gb and I would upgrade it to 8Gb if necessary, but
even when I allow PHP to use 2.5Gb or even 3Gb of RAM, it still barfs.
> Can you tell us a little more about the nature of the file?
text file.
> If its textual rows, with the \n character, then you'll be wanting to
> use fgets() to read one line at a time.
>
> If its xml, then look at the xml parsing functions.
Even when I use fgets() I still get the same error message:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to
allocate 2023545829 bytes) in /www/scan.php on line 145
This file is XML though I don't want specific XML programming if I can avoid
it. It should work fine on XML files to retrieve the data, as it works on
haphazard non-XML files.