ZenCart on IIS

Author: Eric Woersching

Published on January 15, 2008 by ewoersch

Updated on March 19, 2008 by ewoersch

Average Rating  Rate It (0)

Tags:
FastCGI
PHP
RSS

Introduction

ZenCart™ is the art of e-commerce: a free, user-friendly, open source shopping cart system. The software is developed by group of like-minded shop owners, programmers, designers, and consultants who think e-commerce could be, and should be, done differently.

For more information about ZenCart, see http://www.zen-cart.com/.

In this section, we go through the steps required to install ZenCart to work with the FastCGI extension on  IIS 6.0 and IIS 7.0.

To find out more about FastCGI support in IIS, see http://www.iis.net/fastcgi.

The following steps assume that you have completed the setup and configuration of FastCGI extension and PHP libraries as described in http://www.iis.net/fastcgi/phpon60.

Download and Unpack ZenCart

First, download the latest stable release of Zen Cart v1.3.x. For this article, we use zen-cart-v1.3.7.1 downloaded from the mirror http://sourceforge.net/project/showfiles.php?group_id=83781&package_id=171544.

Once you download the package, uncompress it and copy all the files and folders to C:\Inetpub\wwwroot\zencart.

Set Up the Database

Before starting the installation procedure for ZenCart, create a database on your server. Also create a user and grant this user db ownership permission to the database.  Follow the instructions in the Setting Up a Database for a PHP Application on IIS article for a MySQL database.   This walkthrough uses the following database information:

  • Database Name: 'zencart'
  • Database User: 'zencart'
  • Account Password: 'zencart' 

Set Up and Configure the Application

We also update the php.ini file to add the php_mysql.dll module under the Dynamic Extensions section in the file and ensure that the extension directory points to the correct location:
extension_dir = "./ext"
 extension=php_mysql.dll

Important: This guide uses the "/zencart" folder as an example.   Using the folder name "/zencart" is not required. Use something else, or nothing at all if you prefer to install in the "root" (which is the "base" of your website).

Creating the Configure.php Files

Two filesmust be created on the server: the configure.php files that identify the settings of your particular server; and, the location of the files that you just loaded. After they have been created, you must change the permissions on these files.

1. On the server, locate the file: /zencart/includes/dist-configure.php.

2. Rename this file to configure.php.

3. On the server, locate the file: /zencart/admin/includes/dist-configure.php.

4. Rename this file to configure.php.

5. Change the permissions for these two files to read, execute and write. Open the folder where the files are located, and open the properties of the file, then under the Security tab, ensure that the "Internet Guest Account", identified usually as:
MACHINE_NAME\IUSR_MACHINE_NAME ... has "read" and "write" privileges, as well as "modify".

This should be done on each file/folder indicated. (If the IUSR_MACHINE_NAME account is not listed, click "Add" and add that account from the list, and then set the required permissions.)

Note: "_MACHINE_NAME" above refers to the "machine name" or "computer name" configured by the server administrator to "name" the server.

Set Permissions on Folders

  • Change the permissions on the following directories to read, execute and write similar to the configuration files.

/zencart/cache
/zencart/images
/zencart/includes/languages/english/html_includes
/zencart/media
/zencart/pub
/zencart/admin/backups
/zencart/admin/images/graphs

Note: Open the zencart/images directory and change all of the subdirectories and their subdirectories to permissions to read, write and execute.

/zencart/images/attributes
/zencart/images/banners
/zencart/images/categories
/zencart/images/large
/zencart/images/large/dvd
/zencart/images/manufacturers
/zencart/images/medium
/zencart/images/upload

Running the Installer

The installer is intelligent and can automatically supply answers to the questions listed below.

However, you must confirm that the auto-detected answers are correct, as they may differ on some servers. You need the following information for the installation:

Physical Path
The physical path to your new Zen Cart directory, for example: C:\inetpub\wwwroot\zencart.

Browse to the http://localhost/zencart/install.php page for detailed setup instructions.
If you see a list of filenames and directories, speak to your Hosting Site about how to setup your server to auto-detect PHP filename extensions.

Welcome
You see a "Welcome to Zen Cart" page, explaining the features of Zen Cart.

License
Clicking on Continue takes you to the license page, where you are asked to read and confirm acceptance of the GPL licensing agreement.

System Inspection
Next, the installer examines your server for compliance with the technical requirements for running Zen Cart, presenting you with several items you may need or want to address with your host.

Anything marked in red or with an "X" must be addressed before the installer can continue. Items marked with an orange or yellow "caution" symbol are simply warnings that may or may not apply to your setup at this point. The image folders and others as described earlier in this document are also noted. If you make changes to your server, click Re-Check or press F5 in your browser to refresh the display and reflect the changes made before proceeding.

Once the system inspection is satisfactory (all green check-marks), click Install at the bottom of the screen.

 

System Setup
On the System Setup page, you must complete the information described in "Before Running the Installer" earlier in this document.

Note: If you receive any error messages, go through the above steps to make sure you have not left anything out. All error messages have context-sensitive help via a popup window. Click the more info... links.

phpBB Setup
Next, you are prompted for phpBB path information. If you have the phpBB forum software already installed on your site, you may enable it for connectivity and synchronization from Zen Cart. To enable it, specify the path on your server where the phpBB files are located. For example, if they are in ...public_html/forums, enter /forums in the Zen Cart installer for the path to the phpBB files.

Database Setup
On the next page, you are asked for Database Information about your MySQL database, username and password. If you do not have a clean MySQL database setup with a username and password, you must create one. 


 
Store Setup
Complete the Store Information about your  e-commerce shop.
Note: Except for "demonstration data", all of the information here can be (re)configured later in the Admin area of your shop.

Demo Data
To install the demonstration data, select Yes.
After you click Save Store Settings, there is some hesitation as the database tables create and the demomonstration data is optionally loaded. You see progress indicators as the database is loaded.

Admin Setup
Complete the Admin Information to set your Login name, Admin email address and password.
Note: Both the login name and password are case sensitive.
 
Save the Admin settings and the installation is complete. Providing there were no errors during installation, you can now enter the Admin or the Catalog.

After Installation

When you enter the Catalog, you receive security warnings about the configure.php files and the /zc_install directory.

configure.php files
Change the permissions on the configure.php files to read and execute.
These are located here (remember, "zencart" is used as an example here -- your site may or may not include "zencart" as a folder name):

/zencart/includes/configure.php

/zencart/admin/includes/configure.php

Go to the specified folders, open the file properties and check Read Only to make the file read only. Under the Security tab, ensure that the "Internet Guest Account", identified usually as: MACHINE_NAME\IUSR_MACHINE_NAME ... has only "read" and "execute" privileges.  Give "modify" privileges as well (If the IUSR_MACHINE_NAME account isn't listed, click "Add" and add that account from the list, and then set the required permissions.)

Note: "_MACHINE_NAME" above refers to the "machine name" or "computer name" configured by the server administrator to "name" the server.

Download a copy of these files to your computer from the server as they have been setup and configured to your server specifications based on the Installation process.  If you have any errors or problems, most of these can be corrected by minor adjustments to these two files.

zc_install directory
Finally, delete the /zencart/zc_install directory. If you are only testing and plan to install again, rename the folder to something like: /catalog/zc_install_complete until you take your site live. 

Note: Use a different name other than zc_install_complete, as some hacker may try to use it if they have read this help file. 

Important: For security reasons, Do NOT leave a zc_install folder on the server of a live site.

Getting More Information

To discuss the FastCGI Extension for IIS 6.0, or file bug reports, use the FastCGI forums:
• IIS.NET/ IIS 6 FastCGI forums

To get more information regarding running various PHP applications on IIS, refer to:
• PHP on IIS portal
• PHP community forum

Related Content

Comments

You must Log In to comment.