I have mamp 6.0 installed. When trying to drush up and confirming "yes", I get:

PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12288 bytes) in /Users/me/Sites/jla copy/sites/all/modules/contrib/ctools/includes/stylizer.inc on line 911 Drush command terminated abnormally due to an unrecoverable error. [error] Error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12288 bytes) in /Users/me/Sites/jla copy/sites/all/modules/contrib/ctools/includes/stylizer.inc, line 911 Your memory limit is set to 32M; drush needs as much memory to run as[error] Drupal. Please check your configuration settings in /Applications/MAMP/bin/php/php5.4.10/conf/php.ini or in your drush.ini file; see examples/example.drush.ini for details. The external command could not be executed due to an application [error] error. Illegal string offset 'site' backend.inc:1013 [warning] The command could not be executed successfully (returned: PHP Fatal [error] error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 12288 bytes) in /Users/me/Sites/jla copy/sites/all/modules/contrib/ctools/includes/stylizer.inc on line 911 , code: 255)

This is the result of my drush status: Drupal version : 7.10
Site URI : http://default
Database driver : mysql
Database username : root
Database name : jla_d7
Database : Connected
Drupal bootstrap : Successful
Drupal user : Anonymous
Default theme : jlasitetheme
Administration theme : seven
PHP executable : /Applications/MAMP/bin/php/php5.4.10/bin/php
PHP configuration : /Applications/MAMP/bin/php/php5.4.10/conf/php.ini PHP OS : Darwin
Drush version : 6.0
Drush configuration :
Drush alias files :
Drupal root : /Users/me/Sites/jla copy
Site path : sites/default
File directory path : sites/default/files
Temporary file directory path : /Applications/MAMP/tmp/php

I know that I have set a 128MB memory_limit in the MAMP php5.4.10 file.

closed as unclear what you're asking by kenorb, Shawn Conn, Pierre.Vriens, Adrian Cid Almaguer, No Sssweat Mar 20 '16 at 23:14

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

n.b. The error message says that your memory limit is 32MB, not 128MB. The 128MB setting must be for your web server. Check the php.ini for PHP CLI; it's quoted in the output of Drush status, above: /Applications/MAMP/bin/php/php5.4.10/conf/php.ini. You should find that memory_limit is 32M, or perhaps unset. Set it to 128M, or perhaps even 256M or more, and you should be fine.

  • Thanks Greg. I am not familiar with "PHP CLI" but after doing some searches I'm still not sure if it is necessary. When I do a "which php", I get /Applications/MAMP/bin/php/php5.4.10/bin/php and in MAMP I have set line 234 in php.5.4.10.ini to memory_limit = 256M – Paul Oct 9 '13 at 16:18
  • @Paul: As I said in my answer, Drush is telling you in the error message that your memory limit is set to 32M. Drush is also telling you exactly which php.ini you need to edit to fix the problem. If php.5.4.10.ini is the same file as /Applications/MAMP/bin/php/php5.4.10/conf/php.ini, then I'm not sure what to tell you, but try looking in that file first, and see if there are any other lines that set memory_limit (e.g. grep memory_limit /Applications/MAMP/bin/php/php5.4.10/conf/php.ini) – greg_1_anderson Oct 9 '13 at 20:33
  • Thank you Greg for your persistence with me. You were right. I am still confused why changing the memory_limit in the MAMP interface does not reflect in Drush, but I manually changed the file (as opposed to using the MAMP Pro interface) and it works. – Paul Oct 10 '13 at 18:03
  • I'm not on MAMP, but my expectation is that the MAMP interface probably edits just the php.ini for the web server. It is useful to have a separate php.ini for Drush, in case you want to secure your webserver to a greater degree than Drush allows (e.g. if you want to prevent exec from the webserver, etc.) – greg_1_anderson Oct 10 '13 at 18:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.