0

首先,我将从我在 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)。我在这里缺少什么吗?非常感谢您的帮助。

4

1 回答 1

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 为我制作一个scheme,这显然对我来说效果不佳。

“经验只是我们给错误起的名字”——奥斯卡·王尔德

终于成功了...

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.
于 2014-10-30T13:26:22.193 回答