views:

667

answers:

1

I just downloaded Zend Server Community Edition for windows and found that it did not include the ZF utility included in the tutorials. I downloaded and unzipped the Zend Framework(version 1.7.8, because version 1.8 would not download properly). This includes the zf.bat utility which is meant to generate the basic project files. Unfortunately, neither seem to include the CodeGenerator package which is required for the tool to operate. The error I receive is:

H:\zend>zf

Warning: require_once(Zend/CodeGenerator/Php/File.php): failed to open stream: N o such file or directory in D:\Simon\code\zend\ZendServer\share\ZendFramework\in cubator\library\Zend\Tool\Project\Context\Zf\ControllerFile.php on line 4

Fatal error: require_once(): Failed opening required 'Zend/CodeGenerator/Php/Fil e.php' (include_path='D:\Simon\code\zend\ZendServer\share\ZendFramework\incubato r\library;D:\Simon\code\zend\ZendServer\share\ZendFramework\library;.;D:\Simon\c ode\zend\ZendServer\share\ZendFramework\library') in D:\Simon\code\zend\ZendServ er\share\ZendFramework\incubator\library\Zend\Tool\Project\Context\Zf\Controller File.php on line 4

I have been searching around and found a few discussions. Some other have had the same problem, and fixed it by checking out the latest svn with the following commands:

cd $PATH_TO_ZF/ZendFramework-1.7.7
cp -r incubator/library/Zend/Tool/ library/Zend/
cp -r incubator/library/Zend/Reflection/ library/Zend/
cd library/Zend/Tool
mkdir CodeGenerator
cd CodeGenerator
svn co http://framework.zend.com/svn/framework/standard/incubator/library/Zend/CodeGenerator .
cd ..
find . | grep -v .svn | xargs perl -pi -e "s|Zend/CodeGenerator|Zend/Tool/CodeGenerator|g"
find . | grep -v .svn | xargs perl -pi -e "s|Zend_CodeGenerator|Zend_Tool_CodeGenerator|g"

Unfortunately, the latest svn doesn't have CodeGenerator either.

+2  A: 

In the intervening time since I wrote this question and submitting it, I discovered a potential workaround. Once the msi installer for the Zend server has run its course, issue the following commands from a cmd prompt:

cd <wherever you installed the server>\ZendServer\share
rd /S /Q ZendFramework
mkdir ZendFramework
cd ZendFramework
svn co http://framework.zend.com/svn/framework/standard/trunk/ .

Then, make sure that

<wherever you installed the server>\ZendServer\share\ZendFramework\bin

Is in your PATH environment variable. The zf command now seems to work.

Simon David Pratt
This is because you've now pulled the latest version of Zend Framework from their Subversion repository. Meaning: you solved the problem by downloading Zend Framework 1.8, effectively.
leek
I changed the title of the question to specify that the problem is that the Zend Framework included in the Zend Server package for windows is incomplete.
Simon David Pratt