[英]CakePHP 3.0 bin/cake command not found
I'm coming to CakePHP from Codeigniter.我从 Codeigniter 来到 CakePHP。 I started a new project and installed CakePHP 3.0 using Composer into a Ubuntu Vagrant machine I use for development.
我开始了一个新项目,并使用 Composer 将 CakePHP 3.0 安装到我用于开发的 Ubuntu Vagrant 机器中。
I'm trying to create a DB Migration but it seems the bin/cake console isnt working for me.我正在尝试创建数据库迁移,但似乎 bin/cake 控制台对我不起作用。
I can't find anything in the docs about setting up bin/cake, I also tried setting the cake script as executable.... no joy.我在文档中找不到关于设置 bin/cake 的任何内容,我还尝试将 cake 脚本设置为可执行文件......
All I get is either "permission denied", if I then run as sudo i get "Command not found".我得到的只是“权限被拒绝”,如果我然后以 sudo 身份运行,我会得到“找不到命令”。
Any help appreciated,任何帮助表示赞赏,
your current permission mask is 664, executable bit is missing. 您当前的权限掩码是664,可执行位丢失。
try: 尝试:
chmod 755 bin/cake
OK, here's how i fixed it. 好的,这是我如何解决它。
Turns out the version of vagrant I'm using doesn't allow file permission changes from the terminal it has to be done in the vagrant file. 原来我正在使用的流浪者版本不允许从终端进行文件权限更改,必须在vagrant文件中完成。 So i just set the file permission setting in the vagrant file to 755 and voila!
所以我只是将vagrant文件中的文件权限设置为755,瞧!
Thanks for the help. 谢谢您的帮助。
For me it works to call the cake commands via php itself like: 对我来说,它可以通过php本身调用cake命令,如:
/usr/local/php70/bin/php bin/cake.php <command arguments>
Depends on where your php command is located at. 取决于你的php命令所在的位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.