Zend framework installation
Reference website
http://framework.zend.com/wiki/display/ZFDEV/Installing+Zend+Framework+on+Windows
http://framework.zend.com/manual/en/learning.quickstart.intro.html
http://www.zendcasts.com/getting-started-with-zend-and-wamp-server/2009/06/
Why do I need this documentation?
http://framework.zend.com/wiki/display/ZFDEV/Installing+Zend+Framework+on+Windows
I tried to follow the step the above documentation.
That seems not suitable for beginner so I am doing this document.
I hope this is useful.
Here is the reciepe
Step 1. download some materials
Free Download
WampServer 2.0i [07/11/09] Download ( www.wampserver.com/ )
Includes :
- Apache 2.2.11
- MySQL 5.1.36
- PHP 5.3.0
Zend Framework 1.10.3 Download (framework.zend.com/download/current/)
Download quick start kit
http://framework.zend.com/demos/ZendFrameworkQuickstart.zip

Step 2. Copy zend framework to folder
You can copy wherever you want
In my case, I copied the following folder
E:\wamp\library\zendframework
Step3. Copy the quick start zip file to folder
I copied to under
E:\wamp\www\zendtest
Step 4. You need to set system variables
E:\wamp\bin\php\php5.2.6;E:\wamp\library\zendframework\bin;
First path makes php works.
Second path is for zend framework bin path
After changing system variable, restart your computer

Click Advanced tab

Click Edit button


OK....
Step 4. Edit php.ini
My php,ini file is located under
E:\wamp\bin\apache\apache2.2.8\bin
folder..
if you want to find where php.ini file
go to following link and
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
; Windows: "\path1;\path2"
include_path = ".;c:\php\includes;e:\wamp\library\zendframework\library"
after changing php.ini you need to restart wamp server.
Step 5. You can see the quick start page...Ta da!!
You can type the url like. I hope you can see the following picture.
http://localhost/zendtest/quickstart/public/
then you can see this picture
If you can't see this image... you need to following the below solution this is very useful for me to solve the problem.

This step by step guide... I didn't setting virtual server at the momnent.
Error handling --- Very useful comment -
http://framework.zend.com/manual/en/learning.quickstart.intro.html

Error 1 occurred while trying to create my project from the command prompt.
This error occurrs becuase windows does not know where to look for zf.bat.
C:\zendSites>zf create project quickstart
'zf' is not recognized as an internal or external command, operable program or batch file.
action:
add the zf.bat path to windows xp environment variables...
right click mycomputer>>properties>>advanced>>environment variables>>
then highlight "path" in the list of system variables and click edit
in my case i added ";c:\zend\bin" (without quotes) to the end of the list
note that the leading semicolen is the path separator.
restart computer.
--------------------
Error 2 occurred while trying to create my project from the command prompt and after adding the zf.bat path to windows environment variables. This error occurrs because windows does not know how to execute php scripts. It needs to know the path to php.exe
C:\zendSites>zf create project quickstart
'"php.exe"' is not recognized as an internal or external command,
operable program or batch file.
action: add the php.exe path to the windows environment variables.
same as above, but this time i'm adding the path ;C:\wamp\bin\php\php5.3.0
don't forget to restart your computer
--------------------
Expanded explanation of creating a virtual host on windows running wamp server 2.0
open httpd.conf (click on the wamp icon in the services>>apache>>httpd.conf)
find and uncomment the line: #Include conf/extra/httpd-vhosts.conf by removing the # sign go to C:\wamp\bin\apache\Apache2.2.11\conf\extra\ and open httpd-vhosts.conf note the "Apache2.2.11" in the above path. obviously this is version specific.
add the following block of code to the end of httpd-vhosts.conf...
<VirtualHost *:80>
DocumentRoot "c:\zendSites\quickstart\public"
ServerName quickstart.local
SetEnv APPLICATION_ENV "development"
<Directory c:\zendSites\quickstart\public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot C:\wamp\www
ServerName localhost
</VirtualHost>
...after adding this block of code you will need to update your windows hosts file, which maps requested urls to the server. go to C:\WINDOWS\system32\drivers\etc and open the hosts file. add the following 2 lines to the bottom of the file...
127.0.0.1 localhost
127.0.0.1 quickstart.local
...now restart your wamp server.
notice the entries for localhost. this is to preserve localhost paths like that for phpmyadmin
note, that now you have done this your address will be quickstart.local so any reference in the tutorial that says to go to http://localhost should be replaced now by http://quickstart.local
this page will not be found by requests outside the local computer. ie. you will not be online until you register with a DNS (beyond the scope of this material)
-------------------------
Error 3
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
after making the changes above you will likely get this error In this case the error is caused becuase appache does not have the rewrite module enabled
action:
click on the wamp server icon in the services portion of the windows task bar.
apache>>apache modules>>scroll down to "rewrite_module" and click it.
wamp should restart automatically
----------------------------
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
-----------------------------
Error 5
'dbname' is not recognized as an internal or external command,
operable program or batch file.
cmd input/output:
C:\zendSites\quickstart>zf configure db-adapter 'adapter=PDO_SQLITE&dbname=APPLICATION_PATH "/../data/db/guestbook.db"' production
A db configuration for the production section has been written to the application config file.
'dbname' is not recognized as an internal or external command,
operable program or batch file.
this has to do with the difference between how linux and windows systems intrepret quotation marks.
so you will need to change...
zf configure db-adapter 'adapter=PDO_SQLITE&dbname=APPLICATION_PATH "/../data/db/guestbook.db"' production
to...
zf configure db-adapter "adapter=PDO_SQLITE&dbname=APPLICATION_PATH '/../data/db/guestbook.db'" production
