如何将选项传递给capifony php命令

时间:2013-12-18 11:01:53

标签: php symfony capifony

要部署我的某个网站,我正在使用名为http://capifony.org/的优秀工具,这非常方便,但今天作曲家更新会抛出与此类似的错误:http://tech.enekochan.com/2013/12/16/fix-fatal-error-allowed-memory-size-of-x-bytes-exhausted-tried-to-allocate-x-bytes-with-composer-update/

我的问题是如何在capifony脚本中将提到的选项(-d memory_limit=-1)传递给php控制台?

1 个答案:

答案 0 :(得分:4)

Capifony网站提到how to set which PHP binary is run

All symfony tasks (both symfony 1.x and Symfony2) run using the 
default php binary on the production server. You can change this via:

set :php_bin, "/path/to/php"

尝试将字符串设置为"/usr/bin/env php -d memory_limit=-1"。 / usr / bin / env部分是一个Linux工具,它将在PATH中搜索给定的程序,以避免将程序的完整路径“硬编码”到位。

相关问题