views:

571

answers:

4

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?

A: 

Hi,

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 ;)

ArneRie
In addition there were zend libraries installed in xampp/php/dev/include/Zend. Ultimately I just ended up using un-installing XAMPP and installing XAMPP Lite. Everything works great now.
Mario
UPDATE: The command "zf show version" shows the correct version number now as well, so the incorrect version number was really due to an older version being included with XAMPP.
Mario
A: 

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 :)

aioon
A: 

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/

Monty