
Try working with Zend Studio FOR eclipse instead, it comes with ZF integration. On 8/13/10, Peter Karunyu <pkarunyu@gmail.com> wrote:
*Objectives* My objectives at this time is to get a rough idea of how to get started using the framework, after which I will create an application which uses most of the features a PHP developer uses on a day to day basis, i.e. a login form, a HTML table showing data from a database table, editing that data on a form and maybe uploading some files or photos.
*Pre-requisites*
1. Download Zend Framework (ZF), at the time of writing, this is 1.10.7. (http://framework.zend.com/download/current/) I choose the zip version of *Zend Framework 1.10.7 Full*. 2. I already have a working setup of XAMPP 1.7.2 set up and working. Apache has been set up with mod_rewrite You can get a working copy of XAMPP here (http://www.apachefriends.org/en/xampp.html) 3. Download the tutorial Getting started with Zend Framework from http://akrabat.com/zend-framework-tutorial/, revision 1.7.4. 4. IDE; I am using Eclipse 3.6.0 "HELIOS" with a number of additional plugins, most notably PHP
*Configurations* I modified the System Path environment variable to point to the bin folder of ZF, while at it I also added the path to the XAMPP PHP folder. I also modified the include_path directive in php.ini to point to the library folder of ZF. To make future upgrades easier on me, I created a folder in c:\xampp\php and called it zendframework1-10-7 and in this folder, i copied the folders bin and library from the files i had downloaded. The changes to php.ini and the environment path both pointed to this one folder.
Then i restarted my pc for the system path to take effect.
Funny thing happens when I run the command *zf show version*, its showing its version 1.9.0, I am not sure whether this is the version of Zend Framework or Zend Tool. I will ignore it for now.
*Getting started* I fired up my Eclipse, set up a new PHP project and pointed it to the zf-directory created by the Zend_tool as detailed in the tutorial (page 2 and 3).
On running the command: *zf create action add Index*, I kept getting this error:
*An Error Has Occurred A project profile was not found.
Zend Framework Command Line Console Tool v1.9.0 Details for action "Create" and provider "Action" Action zf create action name controller-name[=index] view-included[=1] module*
Searched the net and came across this http://akrabat.com/zend-framework-tutorial-18/ which suggests two solutions:
1. Use at least ZF 1.9.1 (I am using 1.10? Not sure) 2. Change the current directory to the project where you want the action to be created, in this case c:\xampp\htdocs\zf-tutorial. This didn't work, so i switched to c:\xampp\htdocs\zf-tutorial\application\controllers and still it didn't work.
More searching revealed this is a Windows only setup and many more pips are having the same issue http://framework.zend.com/issues/browse/ZF-7465. Will take a break now.
Just thought of a possible solution, instead of using the command *zf create project zf-tutorial* I will instead use the command *zf create project zf-tutorial zf-tutorial-profile zf-tutorial-profile*" as the zend tool manual says the command has the syntax *zf create project path name-of-profile file-of-profile*
I will also try the recommendation given at http://forums.zend.com/viewtopic.php?f=59&t=2020 (the last post at the bottom) which says "*...My solution: type in cd <project name> and then the context of Zend_Tool will switch to your project.*" though i am not sure what cd <project name> means.
If none of these work, I guess I will have to create the view scripts by hand.
Or someone who has done this before could point me in the right direction...