Installing the Zend Framework on IIS is confusing. There’s next to zero documentation and the few tutorials out there just say “install the Zend Server”. I don’t want to install the Zend Server… My IIS, PHP, MySQL stack works just fine, thank you very much!

Prerequisites: IIS role is installed and functional, PHP is up-to-date and running, and MySQL is up-to-date and running (optional). If you don’t have PHP/MySQL installed, I recommend using the Web Platform Installer. Once they are installed, restart IIS.

First you’ll need to get a copy of the Zend Framework (which is free). You’re going to want either the one called “Zend Framework Full Package” or “Zend Framework Minimal Package”. Extract the files to “C:\php\includes\” (There’s a good chance this directory won’t exist. Just create it). Once extracted, I like to rename the Zend Framework folder to “ZendFramework” instead of “ZendFramework-1.12.1”. Just to keep things clean.

Next, we’re going to need to tell PHP where those files are. Open up the PHP.ini file which is typically located in C:\Program Files (x86)\PHP\(current version number)\PHP.ini. My PHP.ini path is “C:\Program Files (x86)\PHP\v5.4\PHP.ini“. After saving a backup of that file somewhere, open it with Notepad. We’re looking for the “Path and Directories” settings. It’ll look something like this:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"

Since we are in Windows, we need to edit the latter “include_path”. We need to add the path to the Zend Framework Library directory. Change that list to

".;c:\php\includes;c:\php\includes\ZendFramework\Library"

Remove the semi-colon (;) from the beginning of that line. Save your changes and, finally, restart IIS. You should be up and running.

9 Comments

  1. Atiq

    It is the simplest and easiest tutorial I have found! Do you have any tutorial how to install ZF on wamp or xampp ?

  2. Jorge

    Hi,

    “Save your changes and, finally, restart IIS. You should be up and running.”

    Can you please share a tutorial to test if things are working fine? I have a hard time testing it although I followed your steps. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *