Problems with Zend framework's zend_tool in Ubnutu in xampp

bhupendra2895

New Member
Messages
554
Reaction score
20
Points
0
I have installed xampp in Ubuntu 10.04.I want to use zend framework for development of my website.
For this I downloaded zend framework minimal from http://framework.zend.com
I have included library folder in php.ini.But when I ran following commands for using zend_tool i received errors.
Code:
[URL="http://www.apachefriends.org/f/viewtopic.php?f=17&t=41199&start=0#"][/URL]
sudo  /opt/lampp/zend/bin/zf.sh
Error message said "php not found"
So I installed php5-cli
And again type
Code:
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"

If anybody is doing this in linux please tell me how can I run this tool in ubuntu, please help, manually creating directories and files is a pain, if a tool can do it in a second for you. :frown:
 
Last edited:

bhupendra2895

New Member
Messages
554
Reaction score
20
Points
0
I don't know why this happens, whenever I ask for some help from forum, nobody tells me any solution till I myself figure out the solution.Yes today, I solved it. :wink:
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:
export PATH=$PATH:/opt/lampp/bin
2 Then this to check everything is working fine.
Code:
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:
zf.sh show version
It displayed
Zend Framework Version: 1.10.6
Finally it worked :wink:
I created my project using this command
Code:
zf.sh create project /opt/lampp/testproject
So I installed php5-cli
And yes there is no need to install php-cli package.
 

bhupendra2895

New Member
Messages
554
Reaction score
20
Points
0
You could have also just added the zend-framework ppa...

Code:
 sudo add-apt-repository  ppa:zend-framework/ppa
  sudo apt-get update
  sudo apt-get install  zend-framework

https://launchpad.net/~zend-framework/+archive/ppa

Yeah I could do that but I guess for that I have to install apache, mysql and php.That's what I didn't wanted because I am going through some hardware failures.My hard disk is under process of warranty replacement.So I am booting through live CD and have installed xampp on my USB flash drive, which provides me apache+php+mysql and I don't need to install zend framework everytime.So each time my live cd starts i run th following commands

Code:
sudo ln -s /media/Neuron/Project\ Site/opt/lampp /opt/
sudo /opt/lampp/lampp start
export PATH=$PATH:/opt/lampp/bin

#To run Zf tool
/opt/lampp/includes/Zend/library/zf.sh show version
 

meskarune

New Member
Messages
18
Reaction score
0
Points
0
Ouch. That sucks! I hope they get your hard drive replaced soon! Is it a laptop? I had a 7 year old gateway whose hard drive failed, and couldn't find a cheap replacement for it. (I'm using the thing as a cheap server now, also with a live cd and usb drive, lol) My desktop computer has multiple hard drives raided together, so I don't have to worry about failure.
 

bhupendra2895

New Member
Messages
554
Reaction score
20
Points
0
Ouch. That sucks! I hope they get your hard drive replaced soon! Is it a laptop? I had a 7 year old gateway whose hard drive failed, and couldn't find a cheap replacement for it. (I'm using the thing as a cheap server now, also with a live cd and usb drive, lol) My desktop computer has multiple hard drives raided together, so I don't have to worry about failure.
It is a assembled desktop computer, which is 3 years old and each of its component except cabinet and processer has exploited warranty service repairs or replacements. :)

You are lucky you have multiple drives but I had only single hard disk and with it all my projects died and at the same time when i was enjoying holidays at home, my site at a free web host deleted because they were bothered about their T&C.So let's hope my sandisk flash drive will be healthy in near future.

Yes I was unlucky at that time and still posting in this thread using my live CD and USB flash drive.

:)
 

Jackwillow

New Member
Messages
1
Reaction score
0
Points
1
If you're having trouble with Zend Tool on Ubuntu using XAMPP, try checking your PATH variables and permissions. I ran into a similar setup issue while working on a home repairs site, and adjusting those settings did the trick!
 
Last edited:
Top