Zend_Tool问题

发布于 2024-11-17 16:07:22 字数 1634 浏览 2 评论 0 原文

这是我第三次安装zend studio和zend server,现在这两个都安装成功了(半天后)。但是当我尝试创建一个新项目时,我总是收到此 zf 错误...

` ************* >** ZF 错误********** ****** 为了运行 zf 命令,您需要确保 Zend Framework 位于您的 include_path 内。您可以通过多种方式 确保这个 zf 命令行工具知道 Zend Framework 在哪里 库位于您的系统上,但此处无法描述所有库。

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\admin
   * Storage directory assumed in home directory at location \Users\admin/.zf/
   * Storage directory does not exist at \Users\admin/.zf/
   * Config file assumed in home directory at location \Users\admin/.zf.ini
   * Config file does not exist at \Users\admin/.zf.ini

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

好的(拍摄时间 0:04.038) `

我已经通过命令行使用新的 zend-framework 库设置了 ZF_INCLUDE_PATH。

我从来没有干净安装过任何与 zend 相关的东西。

有人可以帮我解决这个问题吗?

谢谢

This is the third time I'm installing zend studio and zend server now these two are installed succesfully (after half a day). But when I'm trying to create a new project I always get this zf error...

`
*************** 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\admin
   * Storage directory assumed in home directory at location \Users\admin/.zf/
   * Storage directory does not exist at \Users\admin/.zf/
   * Config file assumed in home directory at location \Users\admin/.zf.ini
   * Config file does not exist at \Users\admin/.zf.ini

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

ok (took 0:04.038)
`

I've already set the ZF_INCLUDE_PATH via command line with a new zend-framework library.

I never had a clean install with anything related to zend.

Could someone help me with this?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

任谁 2024-11-24 16:07:22

我从你在 Windows 机器上工作的路径推测。 Zend Studio 使用 zend 工具(windows 中为 zf.bat)创建项目。要使其工作,您必须正确安装 zend 工具,即您必须能够打开控制台(WINDOWS+R,键入 cmd,键入 Enter)并成功运行 zf 命令。

在您的情况下,可能是路径问题,您可以按照此处的说明进行解决: http://framework.zend.com/manual/en/zend.tool.framework.clitool.html#zend.tool.framework.clitool.setup-windows

特别是:

Windows Win32 环境中最常见的设置是将 zf.bat 和 zf.php 复制到 PHP 二进制文件所在的目录中。这通常可以在以下位置之一找到:

C:\PHP
C:\Program Files\ZendServer\bin\
C:\WAMP\PHP\bin

您应该能够在命令行上运行 php.exe。如果无法,请首先检查 PHP 发行版附带的文档,或确保 php.exe 的路径位于 Windows PATH 环境变量中。

下一个任务是确保 Zend Framework 库在系统 PHP include_path 内正确设置。要找出 include_path 所在的位置,您可以输入 php -i 并查找 include_path 变量,或者更简洁地执行 php -i | grep include_path 如果你有 Cygwin 设置并且 grep 可用。一旦找到 include_path 所在的位置(通常类似于 C:\PHP\pear、C:\PHP\share、C:\Program%20Files\ZendServer\share 或类似路径),请确保Library/ 目录放在 include_path 指定的目录中。

I presume from the paths you are working on a windows machine. Zend Studio uses the zend tool (zf.bat in windows) to create a project. To make it work you must have properly installed the zend tool, i.e. you must be able to open a console (WINDOWS+R, type cmd, type enter) and successfully run the zf command.

In your case probably is a path issue, that you can resolve following the instructions here: http://framework.zend.com/manual/en/zend.tool.framework.clitool.html#zend.tool.framework.clitool.setup-windows

In particular:

The most common setup in the Windows Win32 environment, is to copy the zf.bat and zf.php into the same directory as your PHP binary. This can generally be found in one of the following places:

C:\PHP
C:\Program Files\ZendServer\bin\
C:\WAMP\PHP\bin

You should be able to run php.exe on the command line. If you are not able to, first check the documentation that came with your PHP distribution, or ensure that the path to php.exe is in your Windows PATH environment variable.

The next order of business is to ensure that Zend Framework library is set up correctly inside of the system PHP include_path. To find out where your include_path is located, you can type php -i and look for the include_path variable, or more succinctly execute php -i | grep include_path if you have Cygwin setup with grep available. Once you have found where your include_path is located (this will generally be something like C:\PHP\pear, C:\PHP\share, C:\Program%20Files\ZendServer\share or similar), ensure that the contents of the library/ directory are put inside your include_path specified directory.

蝶舞 2024-11-24 16:07:22

如果您在 Ubuntu 或 Debian(或者一般的 Linux)上运行,那么现在看来您必须创建环境变量 ZEND_TOOL_INCLUDE_PATH。在 include_path 中包含 zend 框架(或将 zend 框架复制到现有 include_path)似乎不再有效。

要在 Ubuntu/Debian 上手动安装最新版本的 zend 框架,这就是我下载 ZF 并将其解压到 ~/temp 后所做的

sudo cp -R ~/temp/ZendFramework-1.11.11/library/Zend /usr/share/php
sudo cp -R ~/temp/ZendFramework-1.11.11/extras/library/ZendX /usr/share/php
sudo cp ~/temp/ZendFramework-1.11.11/bin/zf.sh /usr/bin
sudo cp ~/temp/ZendFramework-1.11.11/bin/zf.php /usr/bin

下一步编辑 /etc/environment,如果您希望其他程序(例如 Netbeans)能够调用 zf .sh。如果您只想当前用户执行 zf.sh,请编辑 ~/.pam_environment。添加此行:

ZEND_TOOL_INCLUDE_PATH=/usr/share/php

执行此操作后,您可能需要注销并重新登录。

If you are running on Ubuntu or Debian--or maybe Linux in general--it now seems you must create the environment variable ZEND_TOOL_INCLUDE_PATH. Having zend framework in your include_path (or copying zend framework to you existing include_path) no longer seems to work.

To manually install the latest version zend framework on Ubuntu/Debian, this is what I did after downloading ZF and extracting it to ~/temp

sudo cp -R ~/temp/ZendFramework-1.11.11/library/Zend /usr/share/php
sudo cp -R ~/temp/ZendFramework-1.11.11/extras/library/ZendX /usr/share/php
sudo cp ~/temp/ZendFramework-1.11.11/bin/zf.sh /usr/bin
sudo cp ~/temp/ZendFramework-1.11.11/bin/zf.php /usr/bin

Next edit /etc/environment, if you want other programs, like Netbeans, to be able to invoke zf.sh. Edit ~/.pam_environment, if you want only the current user to execute zf.sh. Add this line:

ZEND_TOOL_INCLUDE_PATH=/usr/share/php

You may need to log out and log back in after doing this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文