Added by Thomas Weidner, last edited by Gavin on Dec 26, 2006  (view change) show comment

Labels

 

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.

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 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 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 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)

Install and configure them properly so they will work together.

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.

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:

Test PHP

  1. Create a simple file with the following code:
  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

Hints for starting with the Zend Framework can be found here

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 PDO .dll, you can grab it off of http://pecl4win.php.net/.