I am wondering is there a size limit for array in php 5? I wrote a php script to change the last element of each line in a file. print out the content of a modified file, wh
As manyxcxi says you will probably have to increase the memory_limit. Sometimes you can also reduce memory usage by unsetting large variables with unset($var). This is only needed when the variable stays in scope far past it's last point of use.
Are you by any chance now reading the whole file, tranforming it and then writing the new file? If so you can reduce memory usage by working in a loop where you read a small part, process it and write it out and repeat that until you reach the end of the file. But only if the transformation algorithm doesn't need the whole file to transform a small part.