zftool not behaving as expected

怎甘沉沦 提交于 2019-12-11 02:19:57

问题


I have a hosting service in linux, where I’m trying to develop an app on zend framework 2. I want to use zftool but regardless which zftool command I run, I get always the HTML of the home page.

I’ll really appreciate any help.


Here are the steps to reproduce:

1 - I installed composer

>curl -s https://getcomposer.org/installer | php

2 - I installed the Skeleton MVC application

>php composer.phar create-project -sdev --repository-url="https://packages.zendframework.com" zendframework/skeleton-application ./hmzf

3 - Brought Composer up to date

>php composer.phar self-update

4 - Install ZFTool

>php composer.phar require zendframework/zftool:dev-master

5 - Createa symbolic link to invoke it from my project directory

>ln -s ./vendor/zendframework/zftool/zf.php zf.php

6 - Run zf.php to get the list of modules and what I get in return is the html of the home page of the skeleton app:

> php zf.php modules

回答1:


I found the issue. I had to use php-cli to invoke zf.php. So instead of issuing:

php zf.php modules

which will echo the zend app home page HTML to the console, I had to issue:

php5.4-cli zf.php modules

and I've got the right response from the tool, which is:

Modules installed: Application



来源:https://stackoverflow.com/questions/28056735/zftool-not-behaving-as-expected

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!