arthur's blog

PHP Memory Issues? There's a Hack for That!

I've had to raise my php memory limits much further than I'd like just to get some normal things done in D7. The admin page for Drupal's menu system with a large menu tree can easily crush what I'd consider a healthy amount of available ram. Here is a fast and ugly fix settings.php:

$path = explode('/', $_GET['q']);
if ($path[0] == 'admin') {
  ini_set('memory_limit', '192M');
}

Hopefully this is sufficient for most cases.

Drush for Media Mover

Media Mover 2.x now adds Drush support to allow for running various operations from the commandline. For example:

localhost: drush mm-run convert_video

will run the full convert_video configuration. Likewise, you can choose to run specifc steps from the configuration by specifying the step:

localhost: drush mm-run-step convert_video 1

would run the first step in the specified configuration. You can get information about specifc configurations by using

localhost: drush mm-describe convert_video

and their steps by using the step order:

localhost: drush mm-describe convert_video 1.

A list of all configurations can be found with localhost: drush mm-list. mm-purge can be used to reset a configuration and drop its files- useful for testing purposes.

Hello, Drupal 7.

I will admit out of the gate on this one that this is more than likely a stupid idea. Multiple API change notices were in my inbox this morning. I've ported exactly zero of my modules- which I purport to handle media- leaving the majority of my relevant content offline. I have a stupidly large image as the background image. YSlow gives me a solid E. Oh. And there is the small detail that I'm running on dev not alpha 6.

Pages