0

I'm trying to install Zend Framework Tool.

I follow the documentation and when I run zf.php modules (as stated in the docs) I get zf.php: command not found

I found someone who was having a similar problem here - Could not open input file: zf.php

..so from that post I tried the alternative (from my project directory - /var/www/zf-tutorial) vendor/bin/zf.php modules and it successfully lists my modules.

Why is this inconstant with the documentation? Do I have to write out this whole path every time?

==

So next, when trying to CREATE a project using Zend Tool, naturally I feel I need to navigate out of the project directory to my all projects directory (/var/www)

So I try zf2-tutorial/vendor/bin/zf.php create project zendtest from there... and I get the error (seems strange anyway that I might run a script of another project to create a new one but I'm just trying figure things out for now):

Error: I cannot find the autoloader of the application.
Check if /var/www contains a valid ZF2 application.

OK, seems I need to be within my projects directory where I installed it? So, grudgingly I go back into my projects directory (/var/www/zf2-tutorial) and run it from there - which seems even stranger that I should create a project from within another project... but it seems to work, .. but no, as it puts it inside my zf2-tutorial directory as that is where I am (thought it might)

How do I use this tool? Ideally I'd like to install it once and have it available for ALL projects current and future. Is simply zf create projects too possible? zf.php ... just seems messy

Community
  • 1
  • 1
Martyn
  • 6,031
  • 12
  • 55
  • 121
  • Is it executable? `chmod +x zf.php` Have you tried running it with php? `php zf.php` – mingos Jul 10 '14 at 13:55
  • Yeh it's executable (I run your line just to be sure) but it wouldn't run by `vendor/bin/zf.php modules` either if it weren't, no? – Martyn Jul 11 '14 at 02:07

0 Answers0