Zend framework 2.0.6 CLI工具无法正常工作

时间:2013-01-05 20:22:37

标签: php wamp zend-framework2

近两天都在挠头。 我已经下载了“Zend Framework 2.0.6 Minimal”。 我正在尝试使用“Wamp Server 2.2E”将其设置为正常工作。

由于我没有在ZendFramework bin 文件夹中找到CLI工具,我已经下载了 zf.bat &来自Here zf.php 我已将它们放在我的wamp PHP文件夹中(因为我已经在Windows上有了它的路径)

我还在我的 php.ini 文件中映射了库路径,该文件位于wamp上,因此它将如此:D:\wamp\bin\php\ZendFramework\library

现在,当我打开Windows PowerShell并输入zf时,出现以下错误:

***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path.  There are a variety of ways that you can
ensure that this zf command line tool knows where the Zend Framework
library is on your system, but not all of them can be described here.

The easiest way to get the zf command running is to give it the include
path via an environment variable ZEND_TOOL_INCLUDE_PATH or
ZEND_TOOL_INCLUDE_PATH_PREPEND with the proper include path to use,
then run the command "zf --setup".  This command is designed to create
a storage location for your user, as well as create the zf.ini file
that the zf command will consult in order to run properly on your
system.

Example you would run:

$ ZEND_TOOL_INCLUDE_PATH=/path/to/library zf --setup

Your are encourged to read more in the link that follows.
Zend_Tool & CLI Setup Information
(available via the command line "zf --info")
   * Home directory found in environment variable HOMEPATH with value \Users\Shahar Galukman
   * Storage directory assumed in home directory at location \Users\Shahar Galukman/.zf/
   * Storage directory does not exist at \Users\Shahar Galukman/.zf/
   * Config file assumed in home directory at location \Users\Shahar Galukman/.zf.ini
   * Config file does not exist at \Users\Shahar Galukman/.zf.ini

To change the setup of this tool, run: "zf --setup"

所以即使所有的路径都按顺序排列,我仍然会收到这个错误。

我在安装CLI时使用了Zend guide

还找到了question here答案没有帮助我

我还应该怎么办? Zend framework 2.0.6甚至可以使用CLI吗? 是否有另一种解决方案可以使用Zend框架轻松管理和工作?

感谢您提供任何帮助, 沙哈尔

1 个答案:

答案 0 :(得分:3)

Zend Framework 2没有像Zend Framework 1那样的CLI工具。它仍处于开发阶段,可能很快就会发布,也可能不会发布。 ZF1工具不适用于ZF2!这就是为什么它毕竟不包括在内;)