Change PHP Settings When Running a Command

I want to run a command on a shared server, it requires some PHP settings to be set but I can't change them inside php.ini because I can't access the ini file that the terminal reads, so I decided to change those settings when running the command, but I need two settings to be changed. For doing that, I know I can use:

php -d [setting]

For example:

php -d allow_url_fopen=on composer update

So how do I change two settings within the same command?, I tried something like this:

php -d allow_url_fopen=on, memory_limit=512M composer update

But it isn't working, could you help me?

Upvotes: 0

Views: 181

Answers (1)

Thierry Leroux
Thierry Leroux

Reputation: 197

Set -d for each options you need to change:

php -d allow_url_fopen=on -d memory_limit=512M composer update

Upvotes: 1

Related Questions