I have had trouble in the past with memory issues caused by individual scripts on a website using more memory than they should. I have tackled this problem by lowering my PHP memory limit from 512MB (the requirement of one script on the site) to 64MB, and using ini_set("memory_limit", "512M") on the individual script that needed it.
The question is whether this is a good method, or if there are better ways of tackling this issue. The other method I have seen is adding a second php.ini file in the directory of the script, but this will not work because almost all of the scripts for the website are in the same folder.
Please note, I am aware that even a 64MB memory limit is high for most sites, but it is required by the platform I am using.
ini_set()on a script-by-script basis only if you know there's no way to reduce the memory requirements. – Tim Fountain Jul 24 '14 at 13:09