Page 1 of 1

help with Zend install ZF error

PostPosted: Tue Nov 15, 2011 10:43 pm
by davidtheo
I have installed Zend on at Ubuntu 11.10 but when I type zf.sh in the terminal I get this.
I have put the files in the folder /usr/bin/ and made an link from zf.sh to zf

Can someone please help me.


***************************** 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 HOME with value /home/david
* Storage directory assumed in home directory at location /home/david/.zf/
* Storage directory does not exist at /home/david/.zf/
* Config file assumed in home directory at location /home/david/.zf.ini
* Config file does not exist at /home/david/.zf.ini

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

Re: help with Zend install ZF error

PostPosted: Wed Nov 16, 2011 11:32 am
by davidtheo
problem fixed I re-stalled Zend using

sudo apt-get install zend-framework

Re: help with Zend install ZF error

PostPosted: Tue Jan 17, 2012 12:10 am
by kkruecke
It used to be that adding zend framework to your include_path was sufficient. This has always worked for me in the past. On Ubuntu/Debain that meant editing /etc/php5/cli/php.ini and adding /path/to/zendframework/ to include_path (or copying ZF to /usr/share/php, which is already in the default include_path).

However, it seems now, if you manually install zf, you must create the enviroment variable ZEND_TOOL_INLCUDE_PATH=/path/to/zendframework.

Since I also use Netbeans, I wanted this enviroment variable available system wide, so I added it to /etc/environment

Steps to manually install ZF on ubuntu/debain:

download and extract zend framework to ~/temp. Then do:

Code: Select all
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

Then add this line to /etc/environment
ZEND_TOOL_INCLUDE_PATH=/usr/share/php

You may need to log out and log back in.

Re: help with Zend install ZF error

PostPosted: Tue Jan 17, 2012 10:05 am
by davidtheo
Thanks kkruecke,

I have fixed this but I will keep this in mind for next time.


kkruecke wrote:It used to be that adding zend framework to your include_path was sufficient. This has always worked for me in the past. On Ubuntu/Debain that meant editing /etc/php5/cli/php.ini and adding /path/to/zendframework/ to include_path (or copying ZF to /usr/share/php, which is already in the default include_path).

However, it seems now, if you manually install zf, you must create the enviroment variable ZEND_TOOL_INLCUDE_PATH=/path/to/zendframework.

Since I also use Netbeans, I wanted this enviroment variable available system wide, so I added it to /etc/environment

Steps to manually install ZF on ubuntu/debain:

download and extract zend framework to ~/temp. Then do:

Code: Select all
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

Then add this line to /etc/environment
ZEND_TOOL_INCLUDE_PATH=/usr/share/php

You may need to log out and log back in.

Re: help with Zend install ZF error

PostPosted: Wed Jan 25, 2012 4:58 am
by kkruecke
You can also create a configuration file: ~/.zf.ini. It should be in the home directory from which you will run the zf.sh command. If you use Netbeans with Zend Framework, this is the way to go. In fact, ~/.zf.ini is created when you register (within Netbeans, done only once) the zend framework provider.

~/.zf.ini must have a php.include_path="/your/php/include/path" entry. For example, my ~/.zf.ini has
Code: Select all
php.include_path = ".:/usr/share/php:/home/kurt/netbeans-7.1/php/zend"
basicloader.classes.0 = "NetBeansCommandsProvider"


Once ~/.zf.ini is in place, you can copy zf.sh and zf.php to /usr/bin.

Re: help with Zend install ZF error

PostPosted: Fri Nov 23, 2012 11:47 pm
by sineld
Thanks alot @kkruecke. Worked for me.

Re: help with Zend install ZF error

PostPosted: Tue Feb 10, 2015 4:33 pm
by krit4873
I have followed the above process but it gives the error
Could not open input file: ./zf.php
how could i solve it plz help