Don't just arbitrarily increase the php.ini settings to accomodate a
file upload. That message is coming from trying to open a file and
place it entirely in memory (given your previous postings). Use a
file pointer and iterate over each line to minimize the resource
usage.
During a file upload it is chunked into a temporary directory so would
not consume more than 1MB of RAM at a time before that portion is
flushed to the temp file.
The bottom line is not to open a 100 MB file with functions like
file_get_contents() and the like because it attempts to place the
entire file in memory. However, when you should use fopen/fread/
fclose or SplFileObject instead it uses a pointer which is faster, has
a smaller memory footprint, and makes it much easier to seek or read.
--
Bobby Easland
http://www.oscommerce-freelancers.com/
On Apr 19, 4:32 am, Dheeraj Kumar Aggarwal <
dheerajcom...@gmail.com>
wrote:
> Hi
>
> increase the memory_limit option in your php.ini file
>