Problems with Zend framework's zend_tool in Ubnutu in xampp

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Problems with Zend framework's zend_tool in Ubnutu in xampp

Postby bhupendra » 10. July 2010 13:19

I have installed xampp in Ubuntu 10.04.I want to use zend framework for development of my website.
Zend framework ships with zend_tool to easily manage and create projects.it can be run by using zf.sh located in zendframework/bin directory.
When I executed this command in terminal, i got the following error
Code: Select all
sudo /opt/lampp/zend/bin/zf.sh

Error message said "php not found"

So I installed php5-cli
And again type
Code: Select all
sudo /opt/lampp/zend/bin/zf.sh

Then I recieved this error message
***************************** 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 allow 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/ubuntu
* Storage directory assumed in home directory at location /home/ubuntu/.zf/
* Storage directory does not exist at /home/ubuntu/.zf/
* Config file assumed in home directory at location /home/ubuntu/.zf.ini
* Config file does not exist at /home/ubuntu/.zf.ini

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


How can I run this tool in ubuntu, please help, manually creating directories and files is a pain, if a tool can do it automatically for you. :)
bhupendra
 
Posts: 2
Joined: 10. July 2010 13:06

Re: Problems with Zend framework's zend_tool in Ubnutu in xampp

Postby bhupendra » 10. August 2010 12:08

I myself figure out the solution.Yes today, I solved it.
I am writing here how I did it.
1 I used this command to add php binary into environment.This needs to be done because in Xampp PHP is installed as apache module and there is no way from which OS can know this thing is there.
Code: Select all
export PATH=$PATH:/opt/lampp/bin

2 Then this to check everything is working fine.
Code: Select all
php -v

It displayed
PHP 5.3.1 (cli) (built: Nov 22 2009 21:39:37)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

3 I copied zf.sh and zf.php from bin folder from zend package archive in /opt/lampp/bin
4Now i ran this command
Code: Select all
zf.sh show versio
n
It displayed
Zend Framework Version: 1.10.6

Finally it worked
I created my project using this command
Code: Select all
zf.sh create project /opt/lampp/testproject

So I installed php5-cli

And yes there is no need to install php-cli package.

By the way, if you want to use advanced tools like zend framework, phpunit, zend studio or eclipse pdt then you should individually install php, apache, mysql.
bhupendra
 
Posts: 2
Joined: 10. July 2010 13:06


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 5 guests