views:

429

answers:

2

hai

I read that to create a project, execute the zf Windows windows command (zf.bat):

C:\>zf.bat create project newproject

I saw zf.bat in my C:\wamp\www\Zend\bin, I want to create a new project in c:\wamp\www

When I tried to run c:\wamp\www\zf.bat, I got an error message:

"zf.bat is not internal or external command, operable program or batch file.."

Then I tried another method:

c:\wamp\zend\bin\>zf.bat create project newproject

But I got the following error message:

"php is not recognised internal or external command,oprable program or batch file"

I put the Zend Framework in c:\wamp/Zend and I added C:\wamp\zend\library in to my php.ini.

Please help me troubleshoot this problem. Thanks!

A: 

Hello you probably need to have php.exe on your path to use zf.bat

try to edit the zf.bat and make sure to use the full path in the script your php.exe is probably located in your wamp directory somewhee

RageZ
+4  A: 

You need to add php and the zend framework paths to your system environmental variables:

  1. Right click on My Computer and select properties
  2. Go to the advanced tab, and click on Environmental Variables
  3. In the system variables box, scroll till you find the "Path" variable, select it and click the edit button.
  4. Paths are separated using a semicolon ";". Add the path to the zend framework bin folder, and your php bin folder.
  5. Click ok,ok,ok

You should now be able to use the zf command line tool anywhere you need it by typing "zf" to get the help info and to ensure you put the paths in properly.

JohnU