我用CakePHP的2.x的在更早的時候,現在我想取得聯繫的新版本3.0.0CakePHP的3斌/蛋糕烘焙 - 未定義的變量:argv的
我CakePHP安裝了作曲家,一切正常。我已經更改了Salt並配置了數據庫設置。
當試圖運行斌/餅,我發現了以下錯誤:
Welcome to CakePHP v3.0.0 Console
---------------------------------------------------------------
App : src
Path: /html/APP/myapp/src/
---------------------------------------------------------------
Current Paths:
* app: src
* root: /html/APP/myapp
* core: /html/APP/myapp/vendor/cakephp/cakephp
Available Shells:
[Migrations] migrations
[CORE] i18n, orm_cache, plugin, server
[app] console
To run an app or core command, type `cake shell_name [args]`
To run a plugin command, type `cake Plugin.shell_name [args]`
To get help on a specific command, type `cake shell_name --help`
X-Powered-By: PHP/5.6.5
Content-type: text/html; charset=UTF-8
<pre class="cake-error"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr551ffb72d6447-trace').style.display = (document.getElementById('cakeErr551ffb72d6447-trace').style.display == 'none' ? '' : 'none');"><b>Notice</b> (8)</a>: Undefined variable: argv [<b>ROOT/bin/cake.php</b>, line <b>19</b>]<div id="cakeErr551ffb72d6447-trace" class="cake-stack-trace" style="display: none;"><a href="javascript:void(0);" onclick="document.getElementById('cakeErr551ffb72d6447-code').style.display = (document.getElementById('cakeErr551ffb72d6447-code').style.display == 'none' ? '' : 'none')">Code</a> <a href="javascript:void(0);" onclick="document.getElementById('cakeErr551ffb72d6447-context').style.display = (document.getElementById('cakeErr551ffb72d6447-context').style.display == 'none' ? '' : 'none')">Context</a><pre id="</span></span></code>code" class="cake-code-dump" style="display: none;"><code><span style="color: #000000"><span style="color: #0000BB"> </span><span style="color: #007700">*/
<span class="code-highlight"><code><span style="color: #000000"><span style="color: #0000BB"></span><span style="color: #007700">include </span><span style="color: #0000BB">dirname</span><span style="color: #007700">(</span><span style="color: #0000BB">__DIR__</span><span sty</span></span></code></span> </span><span style="color: #DD0000">'/config/bootstrap.php'</span><span style="color: #007700">;
</span></span></code></pre><pre id="cakeErr551ffb72d6447-context" class="cake-context" style="display: none;">$_GET = [
'/html/APP/myapp/bin/cake_php' => '',
'bake' => ''
]
$_POST = []
$_COOKIE = []
$_FILES = []
$_SERVER = [
'SHELL' => '/bin/bash',
'TERM' => 'linux',
'SSH_CLIENT' => '213.188.119.235 53953 22',
'SSH_TTY' => '/dev/pts/1',
'LC_ALL' => 'de_DE.utf8',
'USER' => 'p252938',
'PATH' => '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/html/APP/lib/Cake/Console',
'MAIL' => '/var/mail/p252938',
'PWD' => '/html/APP/myapp',
'EDITOR' => 'vi',
'LANG' => 'de_DE.utf8',
'HOME' => '/home/www/p252938/./',
'SHLVL' => '1',
'LOGNAME' => 'p252938',
'SSH_CONNECTION' => '213.188.119.235 53953 172.16.39.19 22',
'PHP_SELF' => '',
'REQUEST_TIME_FLOAT' => (float) 1428159346.8385,
'REQUEST_TIME' => (int) 1428159346
]
$_ENV = []
$isCli = false</pre><pre class="stack-trace">[main] - ROOT/bin/cake.php, line 19</pre></div></pre>
出了什麼問題?
檢查['register_argc_argv'(http://php.net/manual/en/ini.core.php#ini.register-argc-argv)選項在你的CLI'php.ini'中。 – ndm 2015-04-04 15:09:58
好吧,現在我得到:錯誤:無法找到「Bake」的Shell類。 – Stephan 2015-04-04 15:16:19
我試過https://github.com/cakephp/cakephp/issues/5459與作曲家需要cakephp /烘焙= dev-master但它並沒有幫助 – Stephan 2015-04-04 15:30:54