Simple, powerful, beautiful websites.

Command Line PHP Memory Limits

June 8, 2010

I was writing a script today that was too big to run as a normal web process, when I started to bump up against some PHP memory limit issues.  Basically, I was writing a large CSV file.  The php.ini file was out of reach (this was on a shared account), and I needed to up the Memory Limit for PHP… what to do?

This!

php -d memory_limit=128M my_script.php

Leave a Reply