In this post i`ll explain how to easily set up the Zend Framework. Why Zend Framework?, you may ask and this is the reason.
Anyways, first download the framework from http://framework.zend.com/. You`ll need to register in order to download the full package.
If you haven`t setup a PHP environment I suggest to download xampp here. xampp also comes with an apache server and is very easy to install (for security reasons you may want to read about how to configure your php and apache files somewhere else).
After installing xampp extract the Zend Framework files into a folder of your choice. Next step is to edit the php.ini. Usually this file can be found in the php folder in your xampp installation. Find the line that says include_path and edit the line like this:
Windows: “\path1;\path2″
include_path = “.;D:\Informatik\SERVER\xampp\php\pear\;D:\Informatik\SERVER\xampp\php\ZendFramework\library”
Of course you have to adjust the path so it actually fits the path where you have extracted the Zend Framework.
Now, inside the ZendFramework\bin folder you can find a batch file that is used to create the project structure (MVC). For convenience we`ll create a project inside xampp`s htdocs folder, because apache serves files from there. To do that open a shell and cd to xampp\htdocs folder and type this:
D:\Informatik\SERVER\xampp\htdocs>D:\Informatik\SERVER\xampp\php\ZendFramework\b
in\zf.bat create project testproject
Again, adjust the path so it fits your own xampp\htdocs folder as well as the path to the zf.bat file within the ZendFramework\bin folder.
If you don`t see any error messages displayed in the shell during this process you can check the xampp\htdocs\yourtestproject folder. If you see these folders:

creating a project went fine. Next you need to copy the Zend Folder from your ZendFramework folder to the library folder of your project. Now start up the apache server from the xampp console and point your browser to localhost/yourproject/public and you should see this screen:

Congratulations, now move on and read more about getting started with Zend Framework.
I had a couple of problems to use the zf.bat file due to incorrect settings in the php.ini file, if the same happens to you, you may as well leave a comment with the error message and we`ll try figure out what`s wrong.
Thanks for reading.




#1 by Ganesh on July 12th, 2009
Quote
i got fatal error getpath() not define on line 57 plz help
#2 by Ravi on July 13th, 2009
Quote
C:\Program Files\xampp\htdocs>C:\Program Files\xampp\php\ZendFramework-1.8.4\bin\zf.bat create project testproject
when i am trying to execute this it is giving an error
‘C:\ program is’ is not recognized as an internal or external command.
I have configured all the things as you mentioned above. I have restarted the xampp after making changes in the PHP.INI file.
Please correct where i went wrong
#3 by Norman on July 13th, 2009
Quote
Hi Ravi,
did you add your php interpreter to %PATH%?
#4 by Norman on July 13th, 2009
Quote
Hello Ganesh,
please be a bit more precise regarding the error message.
“On line 57″ does not really help spotting what is wrong.
#5 by Ravi on July 14th, 2009
Quote
Hi Norman,
did you add your php interpreter to %PATH%?
In which file i have to add the PHP interpreter?
You mean i need to edit zf.bat file
SET ZF_SCRIPT=%PHP_DIR%\zf.php
Here in place of %PHP_DIR% i need to add the path of my PHP directory?
Can you plzz help me out.
#6 by Norman on July 14th, 2009
Quote
Hello Ravi,
no i mean the windows %PATH% environment variable which can be set in the system config.
Here is a tutorial about what environment variables are and how to set them in windows:
http://vlaurie.com/computers2/Articles/environment.htm
Basicly you add the path to the php interpreter to the %PATH% environment variable. That makes sure that when you execute a .php script from within the shell the right (in this case the php interpreter) application is used to proccess it.
You problem looks like you didnt add the path to the php interpreter to your %PATH% environment variable.
greetings
Norman
#7 by saravanan on July 16th, 2009
Quote
‘”php.exe”‘ is not recognized as an internal or external command,
operable program or batch file.
when i am trying to execute this it is giving an error
#8 by Pooran Jaiswal on July 16th, 2009
Quote
while running the following command C:\xampp\htdocs>c:\xampp\php\zf\bin\zf.bat create project testproject
i m getting the error include path not proper
In order to run the zf command, you need to ensure that Zend Framework
is inside your include_path. If you are running this tool without
ZendFramework in your include_path, you can alternatively set one of
two environment variables to for this tool to work:
a) ZEND_TOOL_INCLUDE_PATH_PREPEND=”/path/to/ZendFramework/library”
OR alternatively
b) ZEND_TOOL_INCLUDE_PATH=”/path/to/ZendFramework/library”
The former (a) will make the specified Zend Framework first in the
include_path whereas the latter (b) will replace the include_path
with the specified path.
Information:
original include_path: .;C:\xampp\php\zf\library;C:\xampp\php\pear\
attempted include_path: .;C:\xampp\php\zf\library;C:\xampp\php\pear\
script location: c:\xampp\php\zf\bin\\zf.php
where-in i have extracted the zendframework folder inside c:\xampp\php folder
Kindly suggest
#9 by admin on July 16th, 2009
Quote
Hi Saravanan,
that is because you did not add your php interpreter to your %PATH% environment variable. Read one comment above yours on how to fix that.
Greetings
Norman
#10 by admin on July 16th, 2009
Quote
Hi Pooran Jaiswal,
you should be fine adding the path to the Zend Framework to your php.ini`s include_path bit. Maybe you have edited the wrong php.ini in the first place. Check php_info() which ini is in use and edit that one instead.
Norman
#11 by Jiaos on July 17th, 2009
Quote
i can view the index.php in quickstart, but i can’t view the index.phh pf the other new project. it is blank on that page…
#12 by Norman on July 17th, 2009
Quote
Did you copy your ZendFramework/Lib Folder inside your project?
#13 by Jiaos on July 20th, 2009
Quote
ya… i already copy it to my project…
#14 by Jiaos on July 20th, 2009
Quote
still cant see anything…
#15 by cynazem on August 19th, 2009
Quote
I have many sites in htdocs, and I’m trying to figure out how to have them all pointing to a single location of “library”, instead of having to copy a new library folder for each one.
#16 by sanders on August 30th, 2009
Quote
Hello,
I try to create a new project like:
k:\xampp\php\zf.bat create project someName
But it then create’s a new project in my php directory in stead of my webroot. What Am I dowing wrong?
Thanks
#17 by admin on August 30th, 2009
Quote
Hello sanders,
you have to change directory into your webroot first then use :
k:\xampp\php\zf.bat create project someName
greetings
Norman
#18 by Paweł on September 2nd, 2009
Quote
Hello,
I have error
‘”php.exe”‘ is not recognized as an internal or external command,
operable program or batch file.
the solution is add %PATH% to the system variables, but i add the %PATH%
C:\xampp\php and i don’t know why it don’t work.
i want to know how look %PATH% when i’m using xampp.
Greetings
Paweł
#19 by Bade lal verma on November 22nd, 2011
Quote
Follow the following process………to set up zendframework on windows
step 1- Install xampp server on your local drive like. c:/xampp if you have installed xampp then leave first step.
step 2-Download the latest ZendFramework and extract it.
step 3- open Zendframework folder and open subfolder “library” and here you will find a folder named “Zend”, copy it
and past it to the location “c:/xampp/php/”, within “php” folder.
step 4-edit php.ini configuration file “c:/xampp/php/php.ini” , open it and find “include_path” for windows include_path = “.;c:\xampp\php\Zend”.
step 5-open console terminal, and go “c:\xampp\htdocs>” and type the following command
“c:\xampp\htdocs>c:\xampp\php\zf.dat create project mytestproject”. if no error message see. you project has been created.
step 6-check your “htdocs” folder for “mytestproject”. where all the necessary folders.
step 7- open this url in browser “http://localhost/mytestproject/public”
#20 by sajith on April 6th, 2013
Quote
thanks for your clean steps , thank you verymuch
#21 by admin on September 2nd, 2009
Quote
Hello Pawel,
I assume you added a variable named %PATH% to the uservariable section in system control?
Try this instead:
All you need to do is to find the variable that is named “Path” in systemvariables and append the path to the php interpreter to it.
#22 by Paweł on September 2nd, 2009
Quote
Hello,
OK. Now it’s work. But i add PHP_DIR in my systemvariavles.
Thanks for Help. Information on this site are very useful.
Greeting
Paweł
#23 by Zach on September 3rd, 2009
Quote
Okay I am getting the same error php.exe is not recognized as an internal or external command. Now I hear all this talk about system files and paths and I dunno where any of that stuff is. Can someone just give a step by step instruction. Xampp is installed on my computer runnining it as a local host have the zend frmawork folder in my htdocs and all of this is on my D: drive. Where do I go from there I am pretty sure I corrected my php.ini file on the right manner
include_path = “.;D:\xampp\htdocs\ZendFramework-1.9.2\library”
I need this to start standardize my code and I need to start it quick. I know the languages just not how to install the interpreters
#24 by Norman on September 3rd, 2009
Quote
Hello Zach,
I am assuming you are using some sort of windows. Go to system control click on system, click on advanced then on the bottom you find a a button that should be called “environment variable”. Click on it and find the “Path” variable which should be shown in the lower list, where it says system variables. Mark the “path” variable and click edit. Attach the path (the place where you have installed your php version, in my case it is F:\Entwicklung\SERVER\xampp\php;) to your php interpreter to the end of the list. Do not forget to add a ; to the end.
I made you a screenshot too:
http://www.normankosmal.com/RaZeR/Path.jpg
Hope that cleared things up.
regards
Norman
#25 by Steve on September 10th, 2011
Quote
Norman, thank you. It worked like a charm. You are and were very clear guiding us to fix this problem.
I noted two things
1. “C:\xampp\php;” was not included in the System Environment. I edited and included it now.
2. In console i did not do “cd c:\xampp\htdocs\MyProjectName> c:xampp\php\zf create controller About” this was the procedure I was supposed to follow. Now it works
Now I know why it did give errors.
#26 by Zachariah on September 3rd, 2009
Quote
Norman I would like to thank you very much, your help has been greatly apreciated, without you I would have been in the dark a little longer than i would have like. And that Jpg was really handy as well thanxs
#27 by herci on September 15th, 2009
Quote
Hi, i’ve edited my include paths to –
include_path = “.;C:\work\php\pear\;c:\work\php\ZendFramework\library”
and set the path on the environmental varibales to c:\work\php. Now when i run c:\work\htdocs>c:\work\php\ZendFramework\bin\zf.bat create project testproject i dont get any errors but it doesnt create the folders. why is this?
#28 by admin on September 15th, 2009
Quote
Hey herci,
maybe you have modified the wrong php.ini. You can check which php.ini is in use by starting up xampp and point your browser to:
http://localhost/xampp/
Than click on “phpinfo()” from the menu on the left side. Check the bit that says:
“Loaded Configuration File”
and make sure that the path in there equals the path of the php.ini you have modified.
regards,
Norman
#29 by herci on September 16th, 2009
Quote
Hmm..i’ve checked and its pointing to the correct php.ini file and the path on the php.ini file is,
; Windows: “\path1;\path2″
include_path = “.;C:\work\php\pear\;c:\work\php\ZendFramework\library”
#30 by herci on September 16th, 2009
Quote
Below are the lines it show,
Server API Apache 2.0 Handler
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\work\php\php.ini
Scan this dir for additional .ini files (none)
additional .ini files parsed (none)
#31 by Baldev on October 20th, 2009
Quote
Very simple and easy to follow steps.
Thankyou so much for such a nice effort and providing help to us.
#32 by Dave Edwards on November 4th, 2009
Quote
Hi Norman,
I am trying to set up zend on Apache2Triad and did it correctly. Upon crating the testproject it didn’t show any error but couldn’t locate the folder to be created in htdocs!
Could you please help in this case.
Thanks a lot.
Dave
#33 by Fadi on November 5th, 2009
Quote
Thanks a lot , it is a great tutorial.
#34 by Rafa Garcia on November 12th, 2009
Quote
Pooran, i get the same error that you had, and the php.ini that i am editing is the right one, i added the environmental vars in windows and get an ZF ERROR “You need to ensure that ZF is inside your include_path.
FYI, in the information part i get:
attempted include_path: .;c\php5\pear
script location: C:\wamp\www\hellozend\bin\zf.php
i don´t have any php5 folder in c…where can i get and modify this value?
Thanks a lot in advance.
#35 by Muhammad Rashid on November 12th, 2009
Quote
it is helpful for me.
thanks a lot.
#36 by Rafa Garcia on November 13th, 2009
Quote
For the people that come visit for answers in the future, the problem was that i was changing the wrong php.ini. If you have a WAMP instalation, modify the one associated with php.exe, which is located in the same folder than the phh.exe.
Good luck!!!
#37 by Ronald kriwelz on November 23rd, 2009
Quote
thanks dudefor the solution.
#38 by femi on January 26th, 2010
Quote
please am trying to setup zend framework on xampp. after following your procedure, i get this error
C:\xampp\htdocs>C:\xampp\php\fzend\bin\zf.bat create project testpro
Fatal error: Call to undefined method SplFileInfo::getRealPath() in C:\xampp\php
\fzend\library\Zend\Tool\Framework\Loader\IncludePathLoader\RecursiveFilterItera
tor.php on line 57
#39 by admin on January 26th, 2010
Quote
Hello Femi,
upgrade your PHP version to at least 5.2.2. The Zend Framework team recommends PHP 5.2.4
or greater for all components to work as expected.
#40 by femi on January 26th, 2010
Quote
thank u very much, i will do that or get an upgrade of xampp.God bless u .
#41 by Gagan on January 30th, 2010
Quote
Hi
I am facing this issue when i try zf create project quickstart
Fatal Error: Call to undefine method splFileInfo::getRealPath() in E:\zip_unzip\ZendFramework-1.9.7\ZendFramework-1.9.7\library\Zend\Tool\Framework\Loader\IncludePathLoader\RecursiveFilterIterator.php on line 57
I have set my include path in php.ini file the loaded one and set the system environmental variables
Please suggest
#42 by admin on January 30th, 2010
Quote
Read the comment from femi right above yours… your php version may be too old as well. So upgrade it.
#43 by Gagan on January 31st, 2010
Quote
Its working now. Thanks
#44 by Chetan on February 6th, 2010
Quote
Hi ,
It was a nice tutorial to understand, I have installed the zend framework successfully. Can you please provide me a link where I could learn further on this.
Regards
Chetan
#45 by shahram on February 19th, 2010
Quote
hi
i made a project called “new” but when i go to this address
http://localhost/new/public
i can’t see welcome screen it gives me this error
Server error!
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
If you think this is a server error, please contact the webmaster.
Error 500
localhost
02/20/10 01:37:45
Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5
#46 by Kenneth on March 11th, 2010
Quote
Hi!
I created the project but on browsing at ‘http://localhost/test1/public’it gives “Internal Server Error”.
I set the include_path in the php.ini file which is found in C:\wamp\bin\apache\Apache2.2.11\bin\php.ini as indicated by phpinfo().
What’s wrong here am using WAMP2.0 with PHP Version 5.2.9
#47 by dan on March 13th, 2010
Quote
I install ZendFramework 1.10.2. But when I write zf show version, it show
Zend Framework Version: 1.9.0. Anyone know why?
#48 by Femi on March 26th, 2010
Quote
Hello my Admin, please i need a Good working example tutorial of zend frame work on xampp, please can u help me with that. i appreciate for the setup.
#49 by Ashish on April 3rd, 2010
Quote
Hello
I am newbie in Zend. I have configured the zend 1.10.2 on my local machine and through command line i am able to generate all the controllers and actions. Now when i try to see something in webpage through any controller/action it shows me “An error occurred
Page not found”… I am stuck here. Any help is highly appreciable.
when i see access log in my Apache i got this ::
/—-mypath—-/public/artist(controller i have made)/artistaffiliatecontent(Action in that controller) HTTP/1.1″ 404 375
Thanks
Ashish
Pingback: Zend Framework News » Blog Archive » Zend Framework in wenigen Schritten einrichten
#50 by Marcio on April 9th, 2010
Quote
I hope I can get some help.
System Directory as been added, I have put zf.bat and zf.php inside my php.exe directory.
I can run php -i anywhere from my command line.
I can run zf show version anywhere from the command line as well.
However, when I try to create a project, I’m getting:
‘”php.exe”‘ is not recognized as an internal or external command,
operable program or batch file.
What could this be?
#51 by admin on April 9th, 2010
Quote
Hi Marcio,
it means it’s not installed as a path, you either need to add the path or call it absolutely like:
c:\php\php.exe -v c:\path\to\file.php
Check this screenshot how to add php.exe to your path:
http://www.normankosmal.com/RaZeR/Path.jpg
and make sure to check this comment:
http://normankosmal.com/wordpress/?p=47#comment-420
#52 by Raja on April 27th, 2010
Quote
Yes…..Its working fine.
Thanks,
Raja
#53 by Nayana Adassuriya on May 5th, 2010
Quote
Do not forget to add path of the xampp\php to windows environment variable PATH before execute zf.bat file
thanks
Nayana adassuriya
#54 by suresh on June 26th, 2010
Quote
Thanks a lot it helped me
#55 by manas on July 2nd, 2010
Quote
I could configure zend framework successfully.Thanks for the information.Your instructions are very useful for guy like me who is newbie to Zend framework.
#56 by jing on July 17th, 2010
Quote
I am trying to the command zf.bat create project zf_cms and all I get is
Creating project at C:/xampp/htdocs/zf_cms
Note: This command created a web project, for more information setting up your V
HOST, please see docs/README
Warning: domdocument::domdocument(): Entity: line 1: parser error : Start tag ex
pected, ‘<’ not found in C:\xampp\htdocs\ZendFramework\library\Zend\Tool\Project
\Profile\FileParser\Xml.php on line 82
Warning: domdocument::domdocument(): 1.0 in C:\xampp\htdocs\ZendFramework\librar
y\Zend\Tool\Project\Profile\FileParser\Xml.php on line 82
Warning: domdocument::domdocument(): ^ in C:\xampp\htdocs\ZendFramework\library\
Zend\Tool\Project\Profile\FileParser\Xml.php on line 82
Fatal error: Call to undefined method domdocument::importNode() in C:\xampp\htdo
cs\ZendFramework\library\Zend\Tool\Project\Profile\FileParser\Xml.php on line 85
zend_mm_heap corrupted
my php version is 5.2.9 and ZF version is 1.10.
I also tried ZF version 1.9 and get the following error:
Creating project at C:/xampp/htdocs/zf_cms
Warning: domdocument::domdocument(): Entity: line 1: parser error : Start tag ex
pected, ‘<’ not found in C:\xampp\htdocs\ZendFramework\library\Zend\Tool\Project
\Profile\FileParser\Xml.php on line 74
Warning: domdocument::domdocument(): 1.0 in C:\xampp\htdocs\ZendFramework\librar
y\Zend\Tool\Project\Profile\FileParser\Xml.php on line 74
Warning: domdocument::domdocument(): ^ in C:\xampp\htdocs\ZendFramework\library\
Zend\Tool\Project\Profile\FileParser\Xml.php on line 74
Fatal error: Call to undefined method domdocument::importNode() in C:\xampp\htdo
cs\ZendFramework\library\Zend\Tool\Project\Profile\FileParser\Xml.php on line 77
I am stuck and I alread spent an hour just to figure this out but still no luck. Any help would be very much appreciated.
Thanks
#57 by admin on July 17th, 2010
Quote
Hello jing,
I quote:
I suspect that loading php_domxml.dll in your php.ini is the cause of this problem. Try to disable it and see if that helps.
There are two very similarly named extensions, dom and dom_xml – the dom extension is built into php5 and loading the dom_xml extension (designed for php4) will override the default extension.
Let me know if that helped you.
#58 by Mani on July 21st, 2010
Quote
Hi Norman,
I got this errot as below please help.
C:\xampp\htdocs>c:\xampp\htdocs\zend\bin\zf.bat create project testproject
Creating project at C:/xampp/htdocs/testproject
Note: This command created a web project, for more information setting up your V
HOST, please see docs/README
#59 by admin on July 21st, 2010
Quote
Hi Mani,
I do not see any error message? For me it looks like creating the project went well?
#60 by Mani on July 22nd, 2010
Quote
Thanks Norman.
#61 by Mani on July 22nd, 2010
Quote
Hi Norman,
My zendframwork sits in c:\xampp\htdocs\zend\(dir) but when I am running this command getting error as below:
C:\xampp\htdocs\quickstart>php scripts/load.sqlite.php –withdata
Warning: require_once(zend/Loader/Autoloader.php): failed to open stream: No suc
h file or directory in C:\xampp\htdocs\quickstart\scripts\load.sqlite.php on lin
e 13
Fatal error: require_once(): Failed opening required ‘zend/Loader/Autoloader.php
‘ (include_path=’C:\xampp\htdocs\quickstart\application/../library;ô.’) in C:\xa
mpp\htdocs\quickstart\scripts\load.sqlite.php on line 13
Please help me.
Thanking in advanced.
M
#62 by Norman on July 22nd, 2010
Quote
Hi Mani,
my wild guess is that is probably has something to do with your include path. Check here: http://stackoverflow.com/questions/1658908/cant-get-the-zend-loader-to-load-classes-only-under-wamp
For my understanding it tries to open the Autloader.php but can not find the file. Try this:
set_include_path(’C:\xampp\htdocs\quickstart\application\library;’); on line 12 of load.sqlite.php or even better set the path variable to your zend/library folder.
Check this comment: http://normankosmal.com/wordpress/?p=47#comment-420
#63 by Muhammad Raheel on July 26th, 2010
Quote
i am getting error when i try to create a Controller.
C:\Server\wamp\bin\php\php5.3.0> zf create controller C:\Server\wamp\bin
\apache\Apache2.2.11\htdocs\loudBite\application\controllers\account
the following error i am getting.
An Error has occured
a project profile has not found.
zend framework command line console tool v1.10.6
#64 by admin on July 26th, 2010
Quote
Hi Muhammad,
Check your php.ini and add the path to your zend/library folder before the PEAR Path like this:
include_path = “.;E:\xampp\htdocs\ZendFramework\library;E:\xampp\php\PEAR”
Make sure you edit the right php.ini.
#65 by Mani on July 26th, 2010
Quote
Hi Norman,
I am still getting this error when I try to load the public (index.php) as below:
some reason it is not finding the path to “Zend/Application.php” so anyway I can configur this???
Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\quickstart\public\index.php on line 24
Fatal error: require_once() [function.require]: Failed opening required ‘Zend/Application.php’ (include_path=’C:\xampp\htdocs\quickstart\library;.;C:\xampp\php\pear\’) in C:\xampp\htdocs\quickstart\public\index.php on line 24
#66 by Norman on July 26th, 2010
Quote
Hi Mani,
i took this from http://framework.zend.com/manual/de/learning.quickstart.intro.html
Error 4
Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in C:\zendSites\quickstart\public\index.php on line 18
Fatal error: require_once() [function.require]: Failed opening required ‘Zend/Application.php’ (include_path=’C:\zendSites\quickstart\library;.;C:\php5\pear’) in C:\zendSites\quickstart\public\index.php on line 18
at this point if you have not set your include_path in php.ini you will recieve the above error.
action:
click the wamp server icon in the services section of the windows taskbar>>php>>php.ini
now change the following section…
; Windows: “\path1;\path2″
; include_path = “.;c:\php\includes”
to…
; Windows: “\path1;\path2″
include_path = “.;c:\php\includes;c:\zend\library”
…and restart the wamp server again
Often there are multiple php.ini`s. Make sure you have edited the right one.
#67 by Mani on July 27th, 2010
Quote
Hi Norman,
Thanks for your quick response.
I have already configured php.ini in(windows) DIR “C:\xampp\php\php.ini”
include_path = “.;C:\xampp\php\pear;C:\xampp\htdocs\zend\library”
but I am still getting same error as below:
Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\quickstart\public\index.php on line 23
Fatal error: require_once() [function.require]: Failed opening required ‘Zend/Application.php’ (include_path=’C:\xampp\htdocs\quickstart\library;.;C:\xampp\php\pear\’) in C:\xampp\htdocs\quickstart\public\index.php on line 23
thanks!
#68 by Mani on July 27th, 2010
Quote
Hi Norman,
I also tried to configure php.ini file as below:
include_path = “.;C:\xampp\htdocs\zend\library;C:\xampp\php\pear”
but I am still getting error as below:
Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\quickstart\public\index.php on line 23
Fatal error: require_once() [function.require]: Failed opening required ‘Zend/Application.php’ (include_path=’C:\xampp\htdocs\quickstart\library;.;C:\xampp\php\pear\’) in C:\xampp\htdocs\quickstart\public\index.php on line 23
#69 by Norman on July 27th, 2010
Quote
Hi Mani,
the php.ini in your xampp folder may be the wrong one. Do a search on your harddrive for other php.ini`s. You also can start up xampp and navigate to localhost. There you should have the option to view the current configuration of your xampp and php installation. If the include path is different from the one you entered in your .ini then you indeed have edited the wrong ini file. After changes to the ini do not forget to reboot the server.
#70 by Mani on July 29th, 2010
Quote
Thanks Norman,
You are right.There was anothere php.ini file inside the xampp-apache folder.
Thanks
#71 by Norman on July 29th, 2010
Quote
Hi Mani,
glad you got it to work :)
#72 by James Jeffery on July 30th, 2010
Quote
I didn’t notice this was from 2009 until I after I set it up. Luckily nothing has changed from when you write this tutorial and it installed perfectly fine on my Macbook Pro (xampp).
I was reading a book on the Zend framework and it never mentioned the zf.sh file. It showed you how to do it manually, but I think the book is out of date. Hence why I searched for an up to date solution.
Thanks for the set up instructions.
Whats your opinion on Zend vs. Symfony by the way? I used Symfony in the past but it only seemed useful for larger projects. The Zend framework, from what I’ve read, seems a lot more flexible for smaller web apps.
James
#73 by jay mabazza on August 8th, 2010
Quote
works like charm!
#74 by admin on August 9th, 2010
Quote
Hello James,
I didnt work with symfony yet. But I think you could use Zend even for larger websites.
#75 by Sajid on August 14th, 2010
Quote
Hi Norman,
Thanks to provide the info to setup zendframework.
Sajid
#76 by Mohit on August 18th, 2010
Quote
@Norman
Norman,
I have done every possible settings that you already have explained above, but i am still unable to install zend on my xampp its still giving me the error -[ 'c:\xampp\htdocs' is not recognized as an internal or external command,operable program or batch file.] please help me out
-Mohit
#77 by Mani on August 23rd, 2010
Quote
Hi Norman,
I am getting this error as below:
Please can you help me on this.
Warning: Zend_Loader::include_once(CMS\Controller\Plugin\Acl.php) [function.Zend-Loader-include-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\zend\library\Zend\Loader.php on line 146
Warning: Zend_Loader::include_once() [function.include]: Failed opening ‘CMS\Controller\Plugin\Acl.php’ for inclusion (include_path=’C:\xampp\htdocs\quickstart\application/../library;C:\xampp\htdocs\quickstart\library;.;C:\xampp\php\pear\;C:\xampp\htdocs\zend\library’) in C:\xampp\htdocs\zend\library\Zend\Loader.php on line 146
Fatal error: Class ‘CMS_Controller_Plugin_Acl’ not found in C:\xampp\htdocs\zend\library\Zend\Application\Resource\Frontcontroller.php on line 111
#78 by Krumpy on August 29th, 2010
Quote
@admin
Hello,
I had the same problem. But I had to disable the extension php_domxml.dll and php_xmlrpc.dll
Krumpy
#79 by Darren on August 30th, 2010
Quote
Hi Admin,
(Hoping you can help, as I’m on Wamp rather than Xamp, Windows 7 x64)
I’m not getting any errors after doing the following, but no directory is created in C:\wamp\www ….
I’ve altered my php.ini (checked in phpinfo as C:\wamp\bin\apache\Apache2.2.11\bin\php.ini ) to :
include_path = “.;c:\php\includes;C:\wamp\www\frameworks\zend1108\library;C:\Sites\zfapp”
I’ve extracted Zend Framework to:
C:\wamp\www\frameworks\zend1108
I’ve set the Path as per instructions above, adding to the end of this string the location of php.exe:
C:\Program Files (x86)\Nokia……(blah)……..es\Intel\DMIX;C:\wamp\bin\php\php5.3.0
I’ve also set zf.bat to run in compatibility mode (and not) with the same result, no error, but no directory created.
This is what’s in my command prompt when I hit enter:
C:\wamp\www>C:\wamp\www\frameworks\zend1108\bin\zf.bat create project testproject
If you could point me in the right direction, would be much appreciated! Scratching my head on this one….
#80 by admin on August 30th, 2010
Quote
Darren,
try run the command prompt as administrator.
#81 by Darren on August 31st, 2010
Quote
Thanks Admin,
Tried running Command Prompt as Administrator (with and without Wamp running in case that affected it), but no joy.
Then noticed that at least some of C:\wamp\www was set to Read Only. Changed that. Still no folder created. Don’t think my changes were applied, still a square in the Read-only attributes check-box.
Disabled Mcafee virus/spyware/systemguards and tried CMD again. Nada.
Any other ideas appreciated ;-)
Pingback: Web Design Blog Bournemouth | 123 | Web design and SEO using CSS and xhtml » How To Set Up Zend Framework With Wamp For Local Testing And Web Development
#82 by bham on September 12th, 2010
Quote
Hi
how to setup the virtual host after creating the zfproject
#83 by Adrian on September 20th, 2010
Quote
Hey guys,
Darren, I am in the same boat as you, perhaps it’s a wamp thing? I cannot get it working for toffee! I’ve literally followed these guys down to the semi colon and now as I am writing this I am sure I am going bald!
All the changes I have made, using both php.ini files just for good measure and the only error I have seen, which never changed with any of my changes is “H:\www – is not recognised as an internal or external command, operable program or batch file.”
I’ve even double checked directory names and such for spelling mistakes but I have found nothing :(
Has anyone using wamp succeeded?? Darren did you ever get it working? I am totally out of ideas!
I’ll give 5 gold stars to anybody that can help me! :D
#84 by Adrian on September 20th, 2010
Quote
Oops I was making a silly mistake on the command, however now I get no error message whatsoever and no project is created :(
#85 by Adrian on September 20th, 2010
Quote
Ok, I found what my solution, for some strange reason my zf.bat was empty!! So I re extracted the .zip files and this time the .bat file was 2kb in size so I tried out the command again and bam project created!
So, i have no idea how this happened but thought I would let you guys know so you can double check yours. If the .bat file says 0kb its not the full file.
happy zending :D
#86 by Norman on September 21st, 2010
Quote
Thanks for sharing your solution Adrian, very much apreciated :)
#87 by Kevin on September 21st, 2010
Quote
Darren, I am having a similar problem and I think it’s related to Windows 7. I can create a project, but any subfolders created (i.e. views or models) created with the tool are set to read-only. So, then when I do “zf create model MyModel” it errors with this: “Warning: file_put_contents(): failed to open stream: Permission denied…”
Any ideas on this permissions issue on Win 7? I’ve tried changing attributes with the attrib command with no success. Using Windows Explorer to remove the Read Only flag doesn’t work either.
Any help would be *greatly* appreciated.
#88 by Norman on October 5th, 2010
Quote
Kevin,
try running the console as admin, that should work actually!
#89 by Pete on December 1st, 2010
Quote
Hi All,
I got the thing working in the following way (I am using windows VISTA)
1) Control Panel > System > Advanced Setting > Environment Variables>
Select Path – Click Edit
Add % and then type your path to Zend Folder and Also PHP folder. Use % for adding paths.
2) Copy zf.bat and zf.php into your php folder
For me Zend Folder is
C:\xampp\zend_1_11_1
and the bin directory is located inside this zend folder.
Copy zf.bat and zf.php into you php folder. My php folder is
C:\xampp\php
3) Once these files are copied, use zf.bat in php folder and use the command as mentioned by Norma:
zf.bat create project testproject
and it all works fine
Thanks
Pete
#90 by Gagan on December 21st, 2010
Quote
Hi,
I set my environment path and created project successfully. I am using WAMP and the project I created is in www directory.
I am getting an error “Internet server error 500″ when i am running my project http://localhost:8080/testproject/public.
It would be a great help you can tell me what I am doing wrong. I have also put Zand library into my project library folder
Thanks
Gagan
#91 by Gagan on December 21st, 2010
Quote
working fine now. I did not turn on the rewrite engine in my httpd.conf.
Thanks
Gagan
#92 by Adil on January 31st, 2011
Quote
I created a project using CLI, but after sometime i noticed that when i try to create any new project using CLI it’s neither creating a project nor giving any error. What could be the problem?
#93 by aruldass on February 16th, 2011
Quote
Hi Norman,
In system environment variable which path i have to mention? Please give me any example, it may help to figure out my problem.
Thanks in advance.
#94 by Manish on February 23rd, 2011
Quote
Hi there,
I’ve downloaded and extracted the Zend framework to c:\ZEND and add the same to PATH as well.
But the when I give command F:\Projects\PHP>zf create project test_project, it does nothing, it simply returns the command prompt without doing anything.
I checked the zf.bat file in C:\ZEND\BIN and it is BLANK, it has nothing written in it.
Please let me know what am I doing wrong !!
TIA,
Manish
#95 by viswanth on March 10th, 2011
Quote
Thank you all for your posts, these really helped me to install zend framework now i can start my website in zend
Thank you again.
Regards
viswanath
#96 by PC on April 15th, 2011
Quote
Quick tip here: if you have done all your configuration properly and the zf command throws an error about including Zend Framework in include_path, check the type of quotes around the include_path in the php.ini (I had ” instead of “)?! Hope this helps someone avoid the frustration I had.
#97 by Tonny on May 19th, 2011
Quote
It’s a nice and very easy installation guide. Thanks a lot.
#98 by pankaj on May 26th, 2011
Quote
Installing Zend Framework on XAMPP
1) It is assume that XAMPP is installed on your windows system
a) Must have the mod_rewrite extension installed and configured
b) Must also ensure that Apache is configured to support .htaccess files.
Make below change in file C:\xampp\apache\conf\httpd.conf
AllowOverride All
2) Zend is easy to get up and running on XAMPP.
3) Download latest (Zend Framework 1.11.6) Full from link >>
http://framework.zend.com/download/latest
a) Create folder named “ZendFramework” at C:\xampp\php path.
b) Uncompress “Zend Framework 1.11.6.zip” then go to library >>
Zend folder copy all the content and paste in above created ZendFramework folder
at C:\xampp\php\ZendFramework
4) Then make sure to change the include path in
C:\xampp\php\php.ini
append include_path with new ;C:\xampp\php\ZendFramework
It should look something like this:
include_path = “.;C:\xampp\php\pear\;C:\xampp\php\ZendFramework”
>>re-start the xampp server
Installing QuickStart Guestbook Example by Zend
a) Download “ZendFrameworkQuickstart.zip” from
http://framework.zend.com/manual/en/learning.quickstart.intro.html
b) For convenience create a project named “zendQuickStart” inside xampp`s htdocs folder,
because apache serves files from there.
c) Uncompress “ZendFrameworkQuickstart.zip” and Copy content of project folder
“zendQuickStart”.
d) Create VirtualHost on XAMPP
For that make changes in below mention file
>> C:\xampp\apache\conf\extra\httpd-vhosts.conf
DocumentRoot “C:/xampp/htdocs/zendQuickStart/public”
ServerName *
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
>>re-start the server
e) Quickstart uses the sqlite database so make sure the below extension are enable in
php.ini file
extension=php_pdo.dll
extension=php_pdo_sqlite.dll
>>re-start the server
f) Now access http://localhost/
Creating Zend project scaleton using Zend_Tool Command Line
a) Download “ZendFramework-1.11.6-minimal.zip” from path >>
http://framework.zend.com/download/latest
b) Create folder named “ZendFrameworkCli” at path C:/Program Files
c) Uncompress above folder and copy “bin” and “library” folder and paste in
“ZendFrameworkCli” at path C:/Program Files
d) Now Right click on “My Computer” click on properties >> Advance >> Enviroment
Variables >>
Select CLASSPATH under System Varibles click on Edit button and append
;C:\xampp\php to existing value.
f) Run “cmd” command and go to path C:\Progam Files\ZendFrameworkCli\bin>
g) Type below command to check zend verion
C:\Progam Files\ZendFrameworkCli\bin>zf show version
You will see below result
Zend Framework Version 1.11.6
h) Now Type below command to create project
C:\Progam Files\ZendFrameworkCli\bin>zf create project
C:/xampp/htdocs/zfmyfirstproject
This will create a zend framework folder structure for you.
For more details refer PDF store at below path
http://www.akrabat.com/wp-content/uploads/Getting-Started-with-Zend-Framework.pdf
#99 by Prashant Mankar on May 26th, 2011
Quote
hi,
When i launch my website the Fatal Error are displayed in my browser
Fatal error: require_once(): Failed opening required ‘CMS/Controller/Plugin/Acl.php’
I copied the Zend folder in project but still this error is on the page can you give me the solution for this..or for what the error is
#100 by kamlesh on June 17th, 2011
Quote
Hello all
i am beginner to zend framework. just now i have installed zend framework and it’s working fine on local. but to access index.php i have to use path as follow
http://localhost/myproject/public/index.php
but is there any way to set path directly to
http://localhost/myproject/index.php
i have found solution setting path in httpd.config in appache for virtual host but i have some more project in xampp htdocs so is there any other way to set path directly pointing to index.php for every project individually
is it possible with .htaccess file?
thanks and regards
kamlesh bar
#101 by frizi on June 18th, 2011
Quote
Guys thanks a lot for the help. Two things to add:
1. Mention please that after changing the path in windows, the user should restart the computer.
2. load any commands within the zf project directory, otherwise it will throw an ugly error
Enjoy
#102 by stan on July 8th, 2011
Quote
this blog really helped me. within minutes I was able to to install zend framework and create my project. thanks a bunch :)
#103 by christopher on August 19th, 2011
Quote
I have a problem in
bin\zf.bat create project mynewproject
Access is denied.
>No error but i can’t create new project and it says “Access is denied”.
Please help, thankz!
#104 by admin on August 21st, 2011
Quote
Try running the cmd shell as administrator?
#105 by Ujaval on September 2nd, 2011
Quote
Very easy tutorial for installing zend framework! It worked for me..Thanks!
#106 by Rafael Wanjiku on September 12th, 2011
Quote
Thanks! It works perfectly!
#107 by Michael on October 10th, 2011
Quote
I’m using Netbeans 7. I have no trouble using the Zend framework but if I’m just trying to use the Zend library in a stand alone PHP project the Xend library is not fond. It is set up correctly in PHP.ini
If I include the library in the same directory as the project things are fine, but as I don’t want to always duplicate it I have it in a central location. It is here where I have the problem.
Here’s as example of the error the error.
Fatal error: require_once() [function.require]: Failed opening required ‘Zend/Validate/Interface.php’ (include_path=’.;c:wamp\bin\php\php5.3.5\pear;D:ZendFramework\ZendFramework-1.11.4\library ‘)
#108 by Педа on October 22nd, 2011
Quote
Everything went really fine. Thank you for a good tutorial.
#109 by ram on November 28th, 2011
Quote
I have added system environment path like C:\xampp\php\Zend\bin; , but while i run c:\xampp\htdocs>c:\xampp\php\Zend\bin\zf.bat create project myproject this command i got error as “php.exe” is not recognized as an internal or external command, operable program or batch file.. please give me a suggestion….. i can’t find an error i have done…
#110 by Norman on November 28th, 2011
Quote
Hi,
also add the php.exe to your environment. That should work.
#111 by mobeen on December 8th, 2011
Quote
any one having issues in installation of zend can see errors with solutions here:
http://framework.zend.com/manual/en/learning.quickstart.intro.html
#112 by jimb on January 31st, 2012
Quote
Hi guys
I’ve use PHP for years and I’ve been trying recently to get to grips with MVC frameworks but there seems to me so much b!£”%%$ing” about trying to get teh configuration and directories right.
The problem I came across with Zend is the virtual host file so I messed about and got that working
Now I got the require_once(Zend/Application.php)
I checked the inin file and put in the line
include_path = “/usr/share/php/libzend-framework-php/Zend”
restarted the sever and get the same eror
BTW I’m using ubuntu 10.04 with apache 2 and PHP 5.
I suspect the issue is with the include path in the ini file so if anyone has a sample which works then great, if not any advice would be helpful
#113 by Girish on February 3rd, 2012
Quote
Hi..
I’ve checked my Apache error log and its shows the msg
[Fri Feb 03 18:11:14 2012] [alert] [client 127.0.0.1]D:/projects/wamp/www/testproject/public/.htaccess: Invalid command ‘RewriteEngine’, perhaps misspelled or defined by a module not included in the server configuration..
any suggestions???
#114 by Norman on February 3rd, 2012
Quote
Enable the Rewrite Mod in the Apache config, should fix it.
Maybe this helps as well: http://stackoverflow.com/questions/869092/how-to-enable-mod-rewrite-for-apache-2-2
#115 by alin on February 3rd, 2012
Quote
very clear and not missleading like many others. thanks!
#116 by bharathi on December 8th, 2012
Quote
Norman,
By seeing the above threads, i have resolved all my issues. thanks man.
you are great.
#117 by JohnnyW on February 6th, 2012
Quote
Thanks, Pankaj!
To the first commenter: The reason you’re getting that error is because you have a SPACE in your path (”Program Files”). You need to put quotes around your entire path. e.g. “c:\program files\php\zendframework”
#118 by bybe on February 20th, 2012
Quote
Awesome Guide, I got stuck with the standard ZendFramework docs, and this really helped. Thanks alot
#119 by aa.bi on March 27th, 2012
Quote
Hi! I was getting php.exe is not recognized as an internal or external command, operable program or batch file so I follow carefully your instructions. And then I have try it again, I can’t see no error. But the project is not created. Can you help me with this?
Thanks!
#120 by Erol on April 6th, 2012
Quote
Thanx bro
#121 by muni on April 16th, 2012
Quote
Thanks…
Tutorial is superb and helpful………
#122 by akhil mohan on May 14th, 2012
Quote
hi, norman
i am setting up xampp with zendframework, i am able to create project in using command line but after creating project project it says like this:
Testing note:PHPUnIt was not found in your include_path, therefore no testing actions will be created,
but i have already set my path in php.ini file
its include_path = “.c:\xampp\php;c:\xampp\php\ZendFramework\library”
i have set my first path in include_path c:\xampp\php coz my phpunit.bat file is in that path
please help i am stuck with this from last 2 days.
thanks in adwance
#123 by Norman on May 14th, 2012
Quote
Hi mate,
i have never used phpunit but this may help you (seems like alot people having trouble similar to your problem):
http://forums.zend.com/viewtopic.php?f=69&t=10638
Let me know if that helped you.
Regards,
Norman
#124 by akhil on May 15th, 2012
Quote
thanks buddy..it helped me to solve the problem, one has to set include_path in .zf file (of zend framework) and php.ini file, both, to get it going..thanks for the response.. :)
#125 by daitri on May 25th, 2012
Quote
I did everything as you said and ran this command, it’s not giving any error message and it’s not giving any confirmation message as well.
H:\php\xampp\htdocs>H:\php\xampp\php\ZendFramework\bin\zf.bat create project testproject
I created a folder called php in the H drive in it I installed everything related to my PHP, that’s why I have a php next to H:\
I edited php.ini file in xampp/php folder and I also edited ‘development php.ini’ file ‘production php.ini’ file is it a problem? if so what is the actual include_path for thise two files.
Thanks.
#126 by Charu on June 14th, 2012
Quote
Hi!
I’ve followed all the steps you have mentioned and everything went fine. But when I’m pointing the “localhost/myproject/public”, it gave the following error:
Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in D:\xampp\htdocs\testproject\public\index.php on line 18
Fatal error: require_once() [function.require]: Failed opening required ‘Zend/Application.php’ (include_path=’D:\xampp\htdocs\testproject\library;.;D:\xampp\php\PEAR’) in D:\xampp\htdocs\testproject\public\index.php on line 18
Also I have another folder called “docs” inside my “testproject” folder, other than the folders you have mentioned.
Please help me with this.
#127 by Antonio Fabiano on July 2nd, 2012
Quote
I’ve found another drastic way to make a zend project run under Snow Leopard.
I tried to change the php.ini in /etc and /private/etc updating the path and changed the httpd.conf Apache file..but nothing.
After some hours spent to making conf changes and the hateful message
“Warning: require_once(Zend/Application.php): failed to open stream: No such file or directory in /Users/antoniofabiano2/Sites/zf/test/public/index.php on line 18 Fatal error: require_once(): Failed opening required ‘Zend/Application.php’ (include_path=’/Users/antoniofabiano2/Sites/zf/test/library:../library’) in /Users/antoniofabiano2/Sites/zf/test/public/index.php on line 18 ”
So the simplest way is to copy the entire zend’s library dir in your zend project directory for example in httpdocs/zendTest/library
then added this simple code at the top of public/index.php
set_include_path(’../library’);
and now it works
#128 by anand on July 9th, 2012
Quote
Nice
#129 by Nishanth Gopinath on July 10th, 2012
Quote
Hi Norman,
I’ve installed zend framework and xampp. I’ve extracted the files of ZendFramework-1.11.12 to C:\xampp\php within the php folder.
I’ve changed the include_path value to “.;C:\xampp\php\PEAR;C:\xampp\php\ZendFramework-1.11.12\library”
I’ve appended the value in the Path environment variable to “;C:\xampp\php;”
I’ve also copied the files “zf.dat” and “zf.php” to “C:\xampp\php” within the php folder.
Now my command line is as follows:-
C:\xampp\htdocs>C:\xampp\php\ZendFramework-1.11.12\bin\zf.dat create project testproject
AND THE FOLLOWING ERROR COMES:-
‘C:\xampp\php\ZendFramework-1.11.12\bin\zf.dat’ is not recognized as an internal or external command, operable program or batch file.
PLEASE GIVE A SOLUTION AS SOON AS POSSIBLE AS I’VE A PROJECT DEADLINE!
#130 by Norman on July 10th, 2012
Quote
Hi,
please check this comment -> http://normankosmal.com/wordpress/?p=47#comment-362
Its all explained there. You need to add your php interpreter to the windows %PATH% environment variable,
Regards,
Norman
#131 by Nishanth Gopinath on July 11th, 2012
Quote
I’ve already added the php interpreter as I’ve mentioned in my previous post. If that is not the way then please tell me how?
Also, I’ve seen the comment where you’ve shared a link on how to edit the Path environment variable. I’ve tried that method and it still doesn’t work.
Thanks,
Nishanth
#132 by sajjad on September 7th, 2012
Quote
I have no zf.bat file in bin folder…now wht i do?
#133 by JaipurWebs on April 8th, 2013
Quote
In new version i can not finding zf.bat file in bin or in zip file so what i do ?