This tutorial is intended to give an introduction to using Zend Framework 1 to write a simple database driven application. It has been updated for the newer versions of the framework and takes full advantage of the Zend_Tool command line script and Zend_Application for bootstrapping. Other components used include Zend_Controller, Zend_View, Zend_Db_Table and Zend_Form.

I have also written a tutorial on Zend_Auth.

This tutorial has been tested on version 1.10, 1.11 and 1.12 of Zend Framework. It may not work on any version prior to version 1.10.

AllowOverride to All in your Apache configuration and have enabled the mod_rewrite extension. Tutorial note: If you are getting 404 errors when going to any page other than the home page, please make sure that you have settoin your Apache configuration and have enabled the mod_rewrite extension. If you are deploying to a “user” site (e.g. http://localhost/~rob), then you need a RewriteBase line in your .htaccess file that looks something like: RewriteBase /~rob/zf-tutorial/public/ .

Download the PDF (v1.7.8)

Translations

Very kindly, these people have provided translations of this tutorial into other languages. Thank you!

Italian version: Introduzione allo Zend Framework. Translated by Mario Santagiuliana.

Polish version: Pierwsze kroki z Zend Framework. Translated by Radosław Benkel.

Portuguese version: Iniciando com o Zend Framework. Translated by Gilberto Albino.

French version: Débuter avec Zend Framework. Translated by Bernard Opic.

Also, this page has been translated to Slovenian, by Damian Erjavec

Code

The associated code is available:

Further reading

Once you have finished this tutorial, consider buying my book, Zend Framework in Action. Also, the Quick Start is worth reading.

Chris Kirk has kindly provided a Q&A PDF for the 1.8 version of the tutorial which may help if you are having problems.

Previous versions of this tutorial

There have been three previous versions of this tutorial:

Changelog