ZF Error ZF tool setup - zend-framework

Zend 1.9.1
so I get this error
Blockquote
***************************** ZF ERROR ********************************
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. If you are running this without Zendframework in your include-path, you can alternatively set one of two enviroment variables to for this tool to work
ZEND_TOOL_INCLUDE_PATH="/path/to/ZendFramework\library" or alternatively
ZEND_TOOL_INCLUDE_PATH_PREPEND="/path/to/ZendFramework\library"
attempted include_path: c:\php\includes;.
script location: c:\php\bin\zf.php
looking at the attempted include path it shows that my include path is set to 'c:\php\includes', done so via php.ini
inside include folder is 'library/' folder which contains 'zend/'
and my zend bin folder is at c:php/bin
yet I still get this error when trying to use zf in command line?
Ive had a look at other questions to no avail

I ended up using Zend Framework 1 final release - version 1.12.11 to get around this headache and it worked perfectlt as it should have. Had to be a bug in the 1.9 version!

Related

PHPUnit was not found in your include_path, therefore no testing actions will be created

I created a new Zend framework 1 project (I need to learn ZF1 for a old app I'll be working on) using the following command: zf create project zf-tutorial
... but I get an error telling me: PHPUnit was not found in your include_path, therefore no testing actions will be created.
However, I have phpunit installed and I can confirm this by going to the terminal and running phpunit
I installed PHPUnit from their homepage - http://phpunit.de/manual/4.1/en/installation.html
I suspect that zf create * will generate my test files/folders similar to Rails? I really like this feature and would like to enable it for ZF too (if possible)
Any reason why zend tool isn't picking up phpunit?
Maybe put the path where the phpunit is located into your include_path in your php.ini file? phpunit may be in your shell PATH but might not be in the include_path...

Creating a zend project on Zend Studio 9.0.1

I've just installed the latest Zend Studio along with the latest zend server on my PC (windows 7 - 64 bit).
Now I'm trying to create a zend framework project by creating a NEW -> Local PHP Project , choosing a zend framework in location :
C:\Program Files (x86)\Zend\Apache2\htdocs
which is by default my localhost folder.And finally when the project created all I get is 3 included libraries :
Javascript Resources , PHP Include Path , PHP Language Library.
And No additional folders created.
But What with the basic structure of the zend project ?
How can I create the default "Template" zend project ?
UPDATE: Glad you managed to resolve the issue, All the best. Dave
I just tried going through the process and it worked fine for me creating the extra folders.
Just check you selected the right option when going through the wizard as Zend Framework needs to be selected (see image below).
You could try using Zend Tool instead if that doesn't work.
The documentation is here if you haven't used it before - also loads of tutorials online you can watch too.
When you create a new controller using it, you can have it automatically create an index action and index view created.
Likewise if you create a new action in a controller using it the view can be created automatically saving you some time.
If that doesn't work for you either, you may want to try reinstalling Zend Studio.
Hope this helps.
All the best,
Dave
Mystery was solved !
All I had to do is allow "WRITE" permission to my
C:\Program Files (x86)\Zend\Apache2\htdocs
folder.
That's it , so simple !

Error with zend installation on win 7

I am trying to install ZEND FRAMEWORK on my localhost but failing miserable. I am following the below mentioned steps but don't know where am I going wrong. Please help me with the same.
Steps are as follows that I followed:
Downloaded the ZEND Framework full package version 1.11.7 which is about 25 Mb in a zipped version and then unzipped it to a folder called ZendFrameWork.
Copied the ZendFramework folder inside my c:\xampp\php\
changed the "include_path = '.;\xampp\php\PEAR;\.;C:\xampp\php\ZendFramework\library' " in the php.ini file.
Then restarted the apache server.
EDIT :: I have successfully managed to get the zf command to run without any errors. but now, all it does is, after i enter "zf create myproject" it just gets stuck with the cursor blinking on the next line. And if i press CTRL+C, i get the message : Terminate batch job ? (Y/N)
Then set the environment variable for zf.bat file as " C:\xampp\php\ZendFramework\bin "
But when I try to execute the " zf create sampleProjName " from command line it does nothing, so then I used Windows Powershell and it gives the error which I have attached below.
Waiting for your response.
Thanks in advance.
Try using normal cmd - not powershell. Works fine for me.
Thanks for all your response.
I successfully installed Zend Framework.
I removed the full installation and replaced it with minimal installation and also I did not have php.exe set as an environment variable, so i did that too and also in the php.ini file i needed to write the zend library first before the pear one.
And this was it, TA-DA, it worked.
:)

Error with the ZF tool while setting up the GuestBook Application

Iam trying to set up the GuestBook Application which comes with zend framework tutorial , Iam following the steps one by one,
However when I enter this command - zf create db-table Guestbook guestbook
Iam getting an error, I have pasted the error here -
C:\xampp\htdocs\quickstart>zf create db-table Guestbook guestbook
An Error Has Occurred Provider 'db-table' is not a valid provider.
I tried googling and searching on zend forums, but seems no one got this sort of issue so far. Can anyone suggest me whats wrong here?
PS: I have set php in my system path and zf tool works for me, its only this specific command thats giving error.
After Lots of digging in and breaking my head with the ZF tool I found that it is using copy of Zend framework which comes with Xampp for Windows.
When I installed Xampp, Zend Framework(Version 1.9.7) got installed inside the
C:\Xampp\Php\Pear\Zend
directory and since C:\Xampp\Php is in my system path this Zend framework got picked up everytime by Zend Tool.
I copied the latest version of stable Zend Framework(1.10.2) to the Zend folder inside Php\Pear and now its works like cake for me :)
Thanks for all your suggestions!
Download latest version of framework files from this link http://www.zend.com/community/downloads & then extract zip file where you will get folder structure like ZendFramework-1.11.12/library/Zend, So from this folder copy Zend folder to Xampp/php/PEAR/zend folder. Then Go to command mode type Zf --help. Now it shows all the commands.
Now also check version of zend-framework in command mode by typing as
zf show version
it should show as version as zend Framework Version: 1.11.12
Check your version, maybe db-table is newer than your version. I just tried the same command you used (zf create db-table Guestbook guestbook) and it worked.
When i write zf show version it responds 1.11.0dev. What does your version say? If it's low, consider updating after following the changelog and testing the rest of your application with the new version of zf.

Problems with zend-tool reporting that providers are not valid

I have recently setup XAMPP 1.7.3 and ZendFramework 1.10.4 on a new computer and many of the commands that I normally use now fail.
Here are the steps I used to setup and test ZF.
First I added the ZF library folder (C:\xampp\php\ZendFramework-1.10.4\library) to the include path in php.ini.
Then I added the ZF bin folder (C:\xampp\php\ZendFramework-1.10.4\bin) to my Path system variable.
To test that everything is configured correctly I ran the command "zf show version" from the command line. The result is "Zend Framework Version: 1.9.6".
Immediately something appears to be wrong. The file that is downloaded is "ZendFramework-1.10.4.zip" and the reported version is 1.9.6. I have re-downloaded the latest version (1.10.4) and removed old copy. Still the incorrect version number problem persisted.
Having done some research there is a bug in the ZF knowledgebase that version 1.10.3 reports a wrong version number. So that may explain the version number problem.
Moving forward I tried to run some zf-tool commands and certain commands reports that the action or provider is not valid.
Example:
C:\xampp\htdocs>zf create project test
Creating project at C:/xampp/htdocs/test
C:\xampp\htdocs>cd test
C:\xampp\htdocs\test>zf create controller Test
Creating a controller at C:\xampp\htdocs\test/application/controllers/TestController.php
...
Updating project profile 'C:\xampp\htdocs\test/.zfproject.xml'
C:\xampp\htdocs\test>zf create action test Test
Creating an action named test inside controller at C:\xampp\htdocs\test/application/controllers/TestController.php
...
Updating project profile 'C:\xampp\htdocs\test/.zfproject.xml'
C:\xampp\htdocs\test>zf enable layout
An Error Has Occurred
Action 'enable' is not a valid action.
...
C:\xampp\htdocs\test>zf create form Test
An Error Has Occurred
Provider 'form' is not a valid provider.
...
Can any one provide insight into these errors and how to correct them?
I had a similar issue, it turned out that I needed to manually update the zf.bat and zf.php files that came included with xampp after updating to the latest zend framework.
I got them from the zend svn here: http://framework.zend.com/svn/framework/standard/trunk/bin/
the simple way if you are using xampp, just go to the path "xampp\php\PEAR" an replace the older Zend directory with all included files by a new one zend 1.10... dir and your porblems are lost :)
i think your problem is, that Zend Tool is shipped with xampp since some versions.
Try to find zf.bat in your Xampp directory and remove it ;)
ZF friends have written the worst kind of docs. For XAMPP user, it is more difficult. I have learning ZF and posting error getting on the path. I am also using XAMPP.
Your error list is very big. I hope I can help you.
Solution for error "An Error Has Occurred
Action 'enable' is not a valid action." is XAMPP's Zend Tool installation. Delete that.
Check here for more details about the solution and other possible errors: http://www.satya-weblog.com/2010/11/zend-framework-creating-layout.html.