在Mac OS X的Symfony中使用应用程序/控制台 [英] Work with app/console in Symfony at Mac OS X

查看:163
本文介绍了在Mac OS X的Symfony中使用应用程序/控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac Os X上安装了Symfony并执行:

I've installed Symfony on Mac Os X and do:

chmod -R 777 app/cache app/log

尝试:

php app/console cache:clear

并返回错误:

[RuntimeException]                                                                        
Unable to write in the "/Users/anton/Sites/local/Symfony/app/cache/dev" directory 

尝试修复它!谢谢!

推荐答案

如果您在Mac上,可以使用ACL,因为在这里
从项目目录:

If you are on Mac you can use ACL as it is explained here. From the project directory:

sudo chmod +a "_www allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "whoami allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs

_www 在第一行是运行Web服务器的名称

_www in the first line is the name of which is running the web server

您必须在第二行更改 whoami ,因为您键入 php app / console cache:clear 。 (通常为您的主文件夹的名称)

You have to change whoami in the second line as it is you when you type php app/console cache:clear. (usually the name of your home folder)

这篇关于在Mac OS X的Symfony中使用应用程序/控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆