这是我第三次安装zend和zend服务器,现在这两个服务器已经成功安装(半天后)。但是当我试图创建一个新的项目时,我总是会遇到这个zf错误.
*************** ZF误差****************为了运行zf命令,您需要确保Zend在您的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库通过命令行设置了ZF_INCLUDE_PATH。
我从来没有任何与zend相关的干净安装。
有人能帮我吗?
谢谢
发布于 2011-09-28 12:43:37
我想从你在windows机器上工作的路径来看。Zend使用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环境变量中。
下一个任务是确保Zend库在系统PHP中正确设置。要找出您的include_path位于何处,可以键入php -i并查找include_path变量,如果您有Cygwin安装程序并有grep可用,则可以更简洁地执行php -i _ grep include_path。一旦找到include_path所在的位置(这通常是C:\pear、C:\pear、C:\Program%20 20Files\ZendServer\share或类似文件),请确保库/目录的内容放在include_path指定的目录中。
发布于 2012-01-16 23:21:39
如果您运行的是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下一步,如果您希望其他程序(如Netbeans )能够调用zf.sh,请编辑/etc/environment。如果只希望当前用户执行zf.sh,则编辑~/..pam_environment。增加这一行:
ZEND_TOOL_INCLUDE_PATH=/usr/share/php完成此操作后,您可能需要注销并重新登录。
https://stackoverflow.com/questions/6507844
复制相似问题