1

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?

Mario
  • 1,999
  • 2
  • 15
  • 28

4 Answers4

1

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
  • 11
  • 1
0

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

opHASnoNAME
  • 20,224
  • 26
  • 98
  • 143
  • 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 May 07 '10 at 17:10
  • 1
    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 May 07 '10 at 19:32
  • @Mario I am also using XAMPP, but I cant find any previous Zend installation. And if I run `zf enable layout`, I still get this error. Is there any possible explanation as to why this is happening? I am using version 1.11.11 – Sthe Jan 26 '12 at 19:06
0

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
  • 16
0

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.

Satya Prakash
  • 3,372
  • 3
  • 31
  • 47