WebFaction
Community site: login faq

What is the best way to give a local php (together with drush for a drupal 8) more memory. Its not necessary for the web cgi/fast-cgi process itself, only for local admin tasks.

My solution was to copy your php.ini file from /usr/local/lib/php72/php.ini, set memory_limit and add an alias in my .bash_profile:

alias php='/usr/local/bin/php72 -c /home/beteigeuze/etc/php.ini'
alias drush='/usr/local/bin/php72 -c /home/beteigeuze/etc/php.ini /home/beteigeuze/bin/drush.phar'

is there an better solution?

asked 23 Oct, 11:04

marcel
671616
accept rate: 0%

Seems like a reasonable solution to me.

(23 Oct, 15:31) seanf

You can also try the -d option, with which you can define an INI entry:

$ php72 -i | grep memory_limit # default
memory_limit => 128M => 128M
$ php72 -d memory_limit=256M -i | grep memory_limit
memory_limit => 256M => 256M

Similarly, you can put that in an alias in your .bash_profile.

permanent link

answered 24 Oct, 15:39

iliasr ♦♦
2.0k14
accept rate: 36%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×86
×62
×7
×7

question asked: 23 Oct, 11:04

question was seen: 145 times

last updated: 24 Oct, 15:39

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM