php memory problem
helloi was running a php script that grabs data from a site and saves data in a txt file.
after running the script for few hours it crashed giving the error
<br />
<b>Fatal error</b>: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 35 bytes) in <b>/home/admin/www/script.php</b> on line <b>3</b
i have changed the memory_limit from 8M to 16M in /etc/php.ini
the script works fine now.
i was wondering if this is a correct way of handing this problem?
i have been advised not to play around with the php memory settings.
anyone ?
thanks
dig