首先,我将从我在MAC上的事实开始。
我有git将cakeDC评论插件克隆到我的应用程序插件目录中。在尝试执行给定的命令来为此插件设置数据库表时,我收到此错误:
sudo Console/cake scheme create --plugin Comments --name app
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysql.dll, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysqli.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_mysqli.dll, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_openssl.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_openssl.dll, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_pdo_mysql.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_pdo_mysql.dll, 9): image not found in Unknown on line 0
Error: Shell class SchemeShell could not be found.
#0 /Users/bellis/workspace/intranet/lib/Cake/Console/ShellDispatcher.php(167): ShellDispatcher->_getShell('scheme')
#1 /Users/bellis/workspace/intranet/lib/Cake/Console/ShellDispatcher.php(69): ShellDispatcher->dispatch()
#2 /Users/bellis/workspace/intranet/app/Console/cake.php(33): ShellDispatcher::run(Array)
#3 {main}
为什么世界上这个命令试图在我的MAC安装上使用.dll文件(仅限Windows)。这里有什么我想念的吗?非常感谢帮助。
答案 0 :(得分:0)
Error: Shell class SchemeShell could not be found.
#0 C:\wamp\www\lib\Cake\Console\ShellDispatcher.php(200): ShellDispatcher->_getShell('scheme')
#1 C:\wamp\www\lib\Cake\Console\ShellDispatcher.php(66): ShellDispatcher->dispatch()
#2 C:\wamp\www\app\Console\cake.php(47): ShellDispatcher::run(Array)
#3 {main}
所以我花了大约15分钟在整个堆栈跟踪中试图解决这个问题。我无法在任何地方找到 SchemeShell.php 文件,但我注意到 Cake / Console / Command 目录中的 SchemaShell.php 。看了一会儿之后,我更好地看了一下我正在进入的控制台命令。
c:\wamp\www\app>Console\cake scheme create DbAcl
此时我跪到额头,花了一点时间嘲笑自己。我试图创建一个架构,但告诉Cake让我成为一个计划,这对我来说显然不会很好。
“经验就是我们给出错误的名字”-Oscar Wilde
最后成功......
c:\wamp\www\app>Console\cake schema create DbAcl
The following table(s) will be created.
acos
aros
aros_acos
Are you sure you want to create the table(s)? (y/n)
[y] > y
Creating table(s).
acos updated.
aros updated.
aros_acos updated.
End create.