1

I am attempting to use Zend Tool in the Zend Framework 2 with no luck. I have installed it with composer in a project directory, and executed the composer install command. This appears to be successful. I have also downloaded the zftool.phar file. When I attempt a command with zf.php or zftool.php I get a failure message:

-bash: zf.php: command not found

But I am in the directory where zf.php is located. I also tried copying zftool.phar to my usr/sbin folder but still receive the command not found message. I have Googled for over an hour and cannot find any solution to this.

If anyone has a clue what I am doing wrong I would greatly appreciate some feedback. Admittedly I am an amateur at this.

I am running OS X 10.8.4.

David Weinraub
  • 14,144
  • 4
  • 42
  • 64
vsteg
  • 11
  • 1

1 Answers1

0

It tells you the command zf.php is not found. It doesn't even look for a file at this point. To use zftool.phar you need to be able to run PHP in your CLI.

To check if PHP is enabled in your CLI type the following:

php --version

It should output something like this:

PHP 5.3.26 (cli) (built: Jun  5 2013 19:16:29) Copyright (c) 1997-2013
The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend
Technologies

Also you have to install/enable the PHAR module for PHP. http://php.net/manual/en/book.phar.php

Now change dir (cd) to where zftool.phar is located and use the zftool.phar like this:

php zftool.phar create project foo