开发者

Problems with zend-tool reporting that providers are not valid

开发者 https://www.devze.com 2022-12-29 20:24 出处:网络
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.

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 n开发者_开发问答ot 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消