Sie sind auf Seite 1von 6

Installing Zend Framework on Windows - Zend Framework Wiki http://framework.zend.com/wiki/pages/viewpage.action?spaceKey=ZF...

Contributors

Installing Zend Framework on Windows


Added by Thomas Weidner, last edited by Shahar Evron on Oct 28, 2009 (view change)
Labels
apache, installation, iis, windows, mysql

Installing Zend Framework on Windows


To install, download the appropriate version (most users will want the "Preview" release) and extract the .zip file to the
directory of your choosing.

There are currently no installers that have been created for Zend Framework.

For information on configuring a URL rewriting engine like Apache mod_rewrite or ISAPI_Rewrite for Microsoft IIS, see
Configuring Your URL Rewriter.

Pre-built Packages

Zend Server or Zend Server Community Edition


You can have Zend Framework setup on Windows by installing Zend Server Community Edition, which is available for
free from Zend, and includes a PHP stack as well as the latest (or close to latest) version of Zend Framework, in one
quick and easy installation.

Manual / Custom Installation

Preparation
A minimal system for Zend framework includes PHP and a web server. Optional a database can be installed. This
section includes different ways to create that environment.

Way 1 (Ala Carte)


Webserver
Download and install the latest version of Apache

Optional if you need a database


Download and install the latest version of MySQL
Download and install the MySQL administration tools
At this point it might be a good idea to verify that the MySQL installation is working by attempting
to connect to it via the query browser (or whatever admin tool you decided to install), and create a
simple database.

PHP
Download and install the latest version of PHP
The PHP installer will ask for the location of the Apache configuration directory. If Apache was

1 of 6 9/3/2010 10:14 PM
Installing Zend Framework on Windows - Zend Framework Wiki http://framework.zend.com/wiki/pages/viewpage.action?spaceKey=ZF...

installed to the default location, the configuration directory will be something like this: "C:\Program
Files\Apache Software Foundation\Apache2.2\conf"
The PHP installation process will update the Apache Configuration file (httpd.conf) and the MIMES
file (mime.types) with the needed directives.

If you have installed a mysql database


Verify that there is a copy of libmysql.dll in the windows system directory, or some other directory
that is in the system PATH. If needed it can be copied from the base directory of the PHP install.
When running the PHP installer be sure to select the modules needed for your database. For MySQL
you will need to select "MySQL" and "PDO/MySQL"

After all Restart Apache to load the new PHP settings

If it went as smoothly as it did for me this is all that needs to be done. As mentioned above, the only file that might
need to be moved into place manually is the libmysql.dll.

Way 2 (Simple)
XAMPP download here

XAMPP is a complete package for Windows (also avaiable for Linux and Co).
It has an installer with predefined configuration for a complete WebServer Environment.

Apache 2.2.3
PHP 5.2
MySQL
Zend Optimizer
and a few more useful programs

Once downloaded and installed the system is ready to go.

Way 3 (Simple)
WAMP download here

WAMP is another complete package (for Windows only) which also has a tray icon that allows you to manage the
services. It's a complete installer with existing configuration for an *AMP environment, plus managers for mysql and
sqlite.

Apache 2.0.58
PHP 5.1.4 + PECL
SQLitemanager
MySQL 5.0.22
Phpmyadmin

Note: though XAMPP comes with PDO modules (Zend DBs preferred db adapters), only the sqlite and sqlite2 adapters
are enabled. Modify the php.ini (C:\wamp\Apache2\bin\php.ini by default) to enable them.

Way 4 (from Originals)


Apache 2.2.3 download here
PHP 5.2.0 download here

Install and configure them properly so they will work together.

Apache and PHP Setup look here

2 of 6 9/3/2010 10:14 PM
Installing Zend Framework on Windows - Zend Framework Wiki http://framework.zend.com/wiki/pages/viewpage.action?spaceKey=ZF...

Way 5 (Boosted)
When you're in need of extended features from apache you might want to use this way which installs PHP 5.2 as
module in Apache 2.2.3.

Apache 2.2.3 with SSL and mod_deflate download here


Also several useful mods and extensions for Apache can be found here as
mod_security
mod_fcgid
mod_log_rotate
PHP 5.2.0 download here
Install PHP be be used as Apache 2.2.x module
Optimize Apache look here
Speed up PHP with APC look here

Way 6 (Using Cygwin)


Download and install Cygwin. Select gcc, lighttpd, apache, libpcre, libjpeg, gd, zlib, libpng, sqlite, autoconf, libtool,
make, etc. when choosing packages to download and install.

Note: If you already have installed Cygwin, make sure to first upgrade all installed packages before compiling PHP.

$ cat ./php-5.1.4/config.nice
#! /bin/sh
#
# Created by configure

CFLAGS='-Os -march=pentium-m -pipe -fomit-frame-pointer' \


'./configure' \
'--enable-fastcgi' \
'--enable-sqlite-utf8' \
'--with-pdo-sqlite=/usr/local/lib/' \
'--enable-soap' \
'--enable-sockets' \
'--with-pcre-regex=/usr/' \
'--with-jpeg-dir=/usr/lib/' \
'--with-png-dir=/usr/lib/' \
'--with-zlib-dir=/usr/lib/' \
'--with-gd' \
"$@"

$ cat ~/bin/gcc
#!/bin/bash
# These optimizations work for a Pentium-M CPU only!
exec ccache /usr/bin/gcc $* -Os -march=pentium-m -pipe -fomit-frame-pointer

Add ~/bin to your PATH in ~/.bashrc.

Download PHP source, from www.php.net or even the latest 5.x.y from http://snaps.php.net.

Then run ./php-5.1.4/config.nice

For lighttpd:

3 of 6 9/3/2010 10:14 PM
Installing Zend Framework on Windows - Zend Framework Wiki http://framework.zend.com/wiki/pages/viewpage.action?spaceKey=ZF...

server.modules = (
"mod_rewrite",
"mod_redirect",
"mod_alias",
"mod_access",
"mod_status",
"mod_setenv",
"mod_fastcgi",
"mod_simple_vhost",
"mod_cgi",
"mod_compress",
"mod_accesslog" )
server.document-root = "/www/pages/"
server.errorlog = "/var/log/lighttpd.error.log"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",

4 of 6 9/3/2010 10:14 PM
Installing Zend Framework on Windows - Zend Framework Wiki http://framework.zend.com/wiki/pages/viewpage.action?spaceKey=ZF...

Test PHP
1. Create a simple file with the following code:

// file: phptest.php
<?php
phpinfo();

2. Place it in your web-server root directory,


3. Enter the URL in your browser: http://localhost/phptest.php

If there is no output or an error occurred, most likely something has been configured incorrectly. Check the
PHP logs and the webserver logs. The location of these log files depends on the directives in the php.ini file
and the httpd.conf (for the Apache web server). Typical locations of these configuration files, and the syntax
of the directives would be something like this:

C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf

ErrorLog "C:/www/logs/error.log
AccessLog "C:/www/logs/access.log

C:/Program Files/PHP/php.ini

; Log errors to specified file.


error_log = "c:/www/logs/php.log"

Rewriting URLs
See Configuring Your URL Rewriter.

Install The Zend Framework


Download and install the Zend_Framework

latest official Zend_Framework here


or play around with the
latest Developer Version of Zend_Framework

Hints for starting with the Zend Framework can be found here

Official framework manual


PHP Architect Tutorial
PHP Wiki
Zend Tips
Zend Tips 2

Debugging Install Issues


"Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The PDO
extension is required for this adapter but not loaded' in ..."
Make sure that PDO is loaded in PHP. Make sure the .dll for the PDO extension is available to PHP (usually by
dropping it into the 'ext' folder of your PHP installation and restarting your web server). If you don't have the

5 of 6 9/3/2010 10:14 PM
Installing Zend Framework on Windows - Zend Framework Wiki http://framework.zend.com/wiki/pages/viewpage.action?spaceKey=ZF...

PDO .dll, you can grab it off of http://pecl4win.php.net/.

Powered by a free Atlassian Confluence Open Source Project License granted to Zend Framework. Evaluate Confluence today.

Powered by Atlassian Confluence 2.8.0, the Enterprise Wiki. Bug/feature request – Atlassian news – Contact administrators

6 of 6 9/3/2010 10:14 PM

Das könnte Ihnen auch gefallen