In this 'Zend from Scratch' series, we will try to get the understanding about Zend Framework...not theoretically, but covering things like installing and configuring Zend Framework, understanding the MVC framework and developing a sample application using Zend.
In this series, I would be using XAMPP for all purposes. XAMPP is nothing but a package of PHP, MySQL, Apache and other services. So, the PHP environment at my end is set up with XAMPP. You can download xampp from https://www.apachefriends.org/index.html.
So, lets get started...This part of the series will cover Installing and Configuring the Zend Framework on Windows.
Zend Framework version 1.7 requires PHP 5.2.4 or later. Previous versions required PHP 5.1.4 or later, although the ZF Programmer's Reference Guide strongly recommended PHP 5.2.3 or later for security and performance improvements included in these versions of PHP.
Step 1: Download Zend Framework
Download the latest version of Zend Framework 1 (Full) from http://framework.zend.com/. At the time of writing this tutorial, the latest version of Zend was 1.12.7.
Step 2: Configure Zend Framework
- Once you download the .zip file, extract its contents to a folder. The folder structure after extracting should look like this:
- Now, copy the 'bin' folder and paste it in the 'PHP' folder, which for me (since I'm using xampp) is 'C:\xampp\php'. Rename the copied folder to 'zend-bin'.
- Open the 'library' folder in the extracted folder. You can find a folder named 'Zend' in it. Copy this 'Zend' folder and paste it in your PHP's include_path. You can find the include_path for your environment in the 'php.ini' file. The default include_path for xampp is:
include_path = ".:/php/includes"
include_path = ".;C:\xampp\php\PEAR"
The format of include_path is "path1;path2". The '.'(dot) in path1 means the current directory. So, there are basically 2 include_path(s).
- Lastly, we need to configure the Zend CLI tool. To do this, we need to add the 'zend-bin' folder to the path System variables. Right click on My Computer and select Properties. In the Advanced tab, click on 'Environment variables'. Here, in the 'System Variables' section, click on edit, and add the path to 'zend-bin' folder (C:\xampp\php\zend-bin) at the end:
And there you are!! You have just set up the environment for creating your first project using the Zend Framework.
The next part of this series will give a brief idea about the MVC architecture of the Zend framework, and we will create our first project using Zend...So stay tuned!!
You can subscribe for free or become a follower to get the latest alerts and posts.