zftool not behaving as expected

2019-07-21 04:45发布

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条回答
姐就是有狂的资本
2楼-- · 2019-07-21 05:09

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

查看更多
登录 后发表回答