Reputation: 41
I am running Windows 7 and am using Xampp. I would like to install the Zend framework for PHP, but I am having difficulties understanding how to install it. I have used the Zend framework before, but it was already installed on the Linux system I was working on.
I am reading through the Zend documentation here: http://framework.zend.com/manual/en/learning.quickstart.create-project.html
I am having trouble with updating the includes_path portion. My original include path was include_path = ".;C:\xampp\php\PEAR"
, but I updated it to include_path = ".;C:\Zend"
.
I then followed the directions for creating a new project by opening the command line tool and running % C:\Zend\bin\zf.sh create project testproject
in the desired directory. I get the following error message: '%' is not recognized as an internal or external command, or a batch file
.
Some help with this would be greatly appreciated.
Upvotes: 3
Views: 10401
Reputation: 801
Add the path to the php interpreter to the %PATH% environment variable:
control panel => system => Advanced system settings => Environment Variables... => System Variables => => append ;C:\xampp\php
Upvotes: -1
Reputation: 11
You can also go to your zendFrame work where you have extracted it and then go to bin folder (in my case “C:\xampp\htdocs\ZendFramework\bin”) where you can find zf.bat . Edit it with any editer and go to
“SET PHP_BIN=php.exe ”
and set it to
“SET PHP_BIN=C:\xampp\php\php.exe”
and it worked for me…
Upvotes: 1
Reputation: 57268
Look's like your trying to run a shell script on cmd, not going to work, try this:
Start > Run > cmd [enter]
> cd C:\path\to\html\docs
> C:\Zend\bin\zf create project quickstart
and do not place the >
marker, just the cd ..
and zf ..
Upvotes: 0
Reputation: 6047
C:\Zend\bin\zf.sh
is for linux, you need C:\Zend\bin\zf.bat
I dont even know how you could run it
To setup ZF you just need to add C:\Zend\library
in your include_path
To fix PHP not found you need to add ;C:\xampp\php\
to the environment variable "Path" from
Click Start
, Right Click on Computer
then click Properties
Then Advanced System settings>Advanced Tab/Environment Variables>System variables>Path/Edit...
Then append to the end ;C:\xampp\php
You should also append ;C:\Zend\bin
for easy access to zf.bat
[2]
Then to create project do not use cd C:\Zend\bin
!! because your project will be created into that directory. Use the full path C:\Zend\bin\zf create project quickstart
or if you did step [2], simply go to your htdocs
(with cd your_htdocs_path
) or whatever you set in apache for web root and execute zf create projext quickstart
you also might need to setup a virtual host "quickstart" in apache and probably new line in windows hosts
file: 127.0.0.1 quickstart
because ZF is designed mainly for virtual hosts
Upvotes: 3
Reputation: 5932
you can install the zend framework using PEAR
pear channel-discover zend.googlecode.com/svn
pear install zend/zend
If you don't know where is your PEAR executable, run a file search for "pear", or "pear.exe".
After that, check out the section called "Setting up the CLI tool on Windows" in http://framework.zend.com/manual/en/zend.tool.framework.clitool.html. It will help you set up a easy access to the zf command line tool.
Upvotes: 1