CakePHP Shell 怪异:工作目录损坏并且找不到 shell
我在运行 CakePHP 1.3 shell 时遇到了问题。我有一个想要测试的 shell,因此我更改到应用程序的目录并尝试运行它:
$ pwd
/path/to/cakephp/app
$ ../cake/console/cake
No configuration could be loaded for domain /path/to/cakephp/app. Exiting...
好吧,这有点奇怪。那么让我们尝试向它传递一个 -app :
$ ../cake/console/cake -app /path/to/cakephp/app
Welcome to CakePHP v1.3.8 Console
---------------------------------------------------------------
Current Paths:
-app: /path/to/cakephp/app/
-working: /path/to/cakephp//path/to/cakephp/app
-root: /path/to/cakephp
-core: /path/to/cakephp
...嗯?核心目录完全错误,我不知道该工作目录发生了什么。使用 -working
传递工作目录会产生完全相同的输出。
最重要的是,我的外壳没有被检测到。我在 CakePHP book 中注意到这个命令应该显示一个列表它正在寻找 shell 的目录,并用 - none
告诉您是否没有。相反,没有目录显示,期间。这些 shell 位于 app/vendors/shells
中,就其价值而言。
所以...我迷路了。这是怎么回事?
I've been running into an issue with running CakePHP 1.3 shells. I have a shell that I want to test, so I change to the directory of my app and attempt to run it:
$ pwd
/path/to/cakephp/app
$ ../cake/console/cake
No configuration could be loaded for domain /path/to/cakephp/app. Exiting...
Okay, that's a little weird. So let's try to pass an -app to it:
$ ../cake/console/cake -app /path/to/cakephp/app
Welcome to CakePHP v1.3.8 Console
---------------------------------------------------------------
Current Paths:
-app: /path/to/cakephp/app/
-working: /path/to/cakephp//path/to/cakephp/app
-root: /path/to/cakephp
-core: /path/to/cakephp
...huh? The core dir is completely wrong and I have no idea what's going on with that working directory. Passing a working directory with -working
results in the exact same output.
On top of that, none of my shells are being detected. I notice in the CakePHP book that this command is supposed to show a list of directories where it is looking for shells and tells you if there are none with - none
. Instead, no directories show up, period. The shells are in app/vendors/shells
for what it's worth.
So...I'm lost. What's going on here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Cake 核心团队的某人回答:
嗯,猜猜是这样。
Answered by someone on Cake's core team:
Well, guess that sorts it.