Skip to end of metadata
Go to start of metadata

<h1>Installing Zend Framework on Windows</h1>

<p>To install, <a href="">download the appropriate version</a> (most users will want the "Preview" release) and extract the .zip file to the directory of your choosing.</p>

<p>There are currently no installers that have been created for Zend Framework.</p>

<p>For information on configuring a URL rewriting engine like Apache mod_rewrite or ISAPI_Rewrite for Microsoft IIS, see <ac:link><ri:page ri:content-title="Configuring Your URL Rewriter" /></ac:link>.</p>

<h2>Pre-built Packages </h2>

<h3>Zend Server or Zend Server Community Edition</h3>

<p>You can have Zend Framework setup on Windows by installing <a href="">Zend Server Community Edition</a>, 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.</p>

<h2>Manual / Custom Installation</h2>


<p>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.</p>

<h3>Way 1 (Ala Carte)</h3>

<li><a href="">Download</a> and install the latest version of Apache</li>

<h4>Optional if you need a database</h4>
<li><a href="">Download</a> and install the latest version of MySQL</li>
<li><a href="">Download</a> and install the MySQL administration tools
<li>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.</li>

<li><a href="">Download</a> and install the latest version of PHP
<li>The PHP installer will ask for the location of the Apache configuration directory. If Apache was installed to the default location, the configuration directory will be something like this: "C:\Program Files\Apache Software Foundation\Apache2.2\conf"</li>
<li>The PHP installation process will update the Apache Configuration file (httpd.conf) and the MIMES file (mime.types) with the needed directives.</li>

<li>If you have installed a mysql database
<li>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.</li>
<li>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"</li>

<li>After all Restart Apache to load the new PHP settings</li>

<p>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.</p>

<h3>Way 2 (Simple)</h3>

<li>XAMPP <a href="">download here</a></li>

<p>XAMPP is a complete package for Windows (also avaiable for Linux and Co).<br />
It has an installer with predefined configuration for a complete WebServer Environment.</p>
<li>Apache 2.2.3</li>
<li>PHP 5.2</li>
<li>Zend Optimizer</li>
<li>and a few more useful programs</li>

<p>Once downloaded and installed the system is ready to go.</p>

<h3>Way 3 (Simple)</h3>

<li>WAMP <a href="">download here</a></li>

<p>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.</p>
<li>Apache 2.0.58</li>
<li>PHP 5.1.4 + PECL</li>
<li>MySQL 5.0.22</li>

<p>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.</p>

<h3>Way 4 (from Originals)</h3>

<li>Apache 2.2.3 <a href="">download here</a></li>
<li>PHP 5.2.0 <a href="">download here</a></li>

<p>Install and configure them properly so they will work together.</p>
<li>Apache and PHP Setup <a href="">look here</a></li>

<h3>Way 5 (Boosted)</h3>

<p>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.</p>

<li>Apache 2.2.3 with SSL and mod_deflate <a href="">download here</a>
<li>Also several useful mods and extensions for Apache can be found here as
<li>PHP 5.2.0 <a href="">download here</a>
<li>Install PHP be be used as Apache 2.2.x module</li>
<li>Optimize Apache <a href="">look here</a></li>
<li>Speed up PHP with APC <a href="">look here</a></li>

<h3>Way 6 (Using Cygwin)</h3>

<p>Download and <a href="">install Cygwin</a>. Select gcc, lighttpd, apache, libpcre, libjpeg, gd, zlib, libpng, sqlite, autoconf, libtool, make, etc. when choosing packages to download and install.</p>

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

<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
$ cat ./php-5.1.4/config.nice
#! /bin/sh

  1. 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

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

<p>Add ~/bin to your PATH in ~/.bashrc.</p>

<p>Download PHP source, from or even the latest 5.x.y from <a class="external-link" href=""></a>.</p>

<p>Then run ./php-5.1.4/config.nice</p>

<p>For lighttpd:</p>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
server.modules = (
"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",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar"
accesslog.filename = "/www/logs/access.log"
url.access-deny = ( "~", ".inc" )
$HTTP[ZFUSER:"url"] =~ "\.pdf$" {
server.range-requests = "disable"
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
server.port = 8080
simple-vhost.server-root = "/cygdrive/c/gavin/home/lighttpd/"
simple-vhost.default-host = "zf"
simple-vhost.document-root = "/www/"
dir-listing.activate = "enable"
compress.cache-dir = "/tmp/lighttpd/cache/compress/"
compress.filetype = ("text/plain", "text/html")
cgi.assign = ( ".php" => "/usr/local/bin/php", ".pl" => "/usr/bin/perl" )
status.status-url = "/server-status"
status.config-url = "/server-config"
url.rewrite = (
"^/status$" => "/server-status" ,
"^/config$" => "/server-config" ,

  1. add your redirect to your framework bootstrap below
    setenv.add-environment = ( "TZ" => "PST8PDT" )

<h2>Test PHP</h2>

<li>Create a simple file with the following code:
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
// file: phptest.php
<li>Place it in your web-server root directory,</li>
<li>Enter the URL in your browser: <a class="external-link" href="http://localhost/phptest.php">http://localhost/phptest.php</a></li>

<li>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:
<ac:macro ac:name="noformat"><ac:plain-text-body><![CDATA[
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"

<h2>Rewriting URLs</h2>
<p>See <ac:link><ri:page ri:content-title="Configuring Your URL Rewriter" /></ac:link>.</p>

<h2>Install The Zend Framework</h2>

<p>Download and install the Zend_Framework</p>
<li><a href="">latest official Zend_Framework here</a><br />
or play around with the</li>
<li><a href="">latest Developer Version of Zend_Framework</a></li>

<p>Hints for starting with the Zend Framework can be found here</p>
<li><a href="">Official framework manual</a></li>
<li><a href="">PHP Architect Tutorial</a></li>
<li><a href="">PHP Wiki</a></li>
<li><a href="">Zend Tips</a></li>
<li><a href="">Zend Tips 2</a></li>

<h2>Debugging Install Issues</h2>

<h4>"Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but not loaded' in ..."</h4>

<li>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 PDO .dll, you can grab it off of <a href=""></a>.</li>

installation installation Delete
iis iis Delete
windows windows Delete
apache apache Delete
mysql mysql Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.