Creating a New OpenCart Deployment on a Windows Server IIS

We are going to cover the deployment of an OpenCart (open source shopping cart) on a Windows 2003 Server, 2008 Server.

We are assuming that the server is setup to run IIS websites, and that you have some general idea about running websites in general on IIS. If this is not the case and you are learning from scratch. Better to learn on Linux server.

Assuming you want to get OpenCart running on IIS.

 

Step 1 – Web Platform Installer

Install the Microsoft Web Platform Installer on the server from this link.

http://www.microsoft.com/web/downloads/platform.aspx

In Windows 2003 you need to:

Go to the directory on your server: C:\php

Find the file: php.ini

Edit the file in a text browser, finding the following lines:

extension=php_curl.dll

extension=php_gd2.dll

extension=php_mysql.dll

And remove the ; before each line:

image

Then save the file.

Start a Command Prompt “cmd” and type “iisreset”

image

This enabled MySQL, GD, and cURL,

 

Step 2 – Setup PHP on the server.

Start the Web Platform Installer and search PHP in the top right of the search window.

Select and install the latest version of PHP from the list.

image

 

Step 3 – Install MySQL on the server.

Also from the Web Platform Installer, search “MySQL” and install that.

image

During the install, you will be asked for a password for the –root- user. This is the Administrator account and the password should be very well guarded and complex.

 

Step 4 – Create a Database in MySQL.

Open the My SQL Command Line Tool and enter the –root- password selected above.

image

Modify the following script to replace the database name, user name and password.

create database mydb;
 
CREATE USER ‘myuser’@’localhost’ IDENTIFIED BY ‘mypassword‘;
CREATE USER ‘myuser‘@’%’ IDENTIFIED BY ‘mypassword’;
 
GRANT ALL PRIVILEGES ON mydb.* TO ‘myuser‘@’localhost’;
GRANT ALL PRIVILEGES ON mydb.* TO ‘myuser‘@’%’;
 
FLUSH PRIVILEGES;

Enter your own values where highlighted above.

Copy and paste that line by line into the MySQL Command Line Window. You only need to run one from the first two, then one from the second two.

If you need to change a password.

SET PASSWORD FOR 'myuser'@'localhost' = PASSWORD('newpass');

SET PASSWORD FOR 'myuser'@'%' = PASSWORD('newpass');

FLUSH PRIVILEGES;

 

Step 5 – Download and unzip to Web Located Folder the contents of OpenCart

Download here: http://www.opencart.com/index.php?route=download/download

The contents of the download package is in a folder called “upload”

image

Extracted in our case to a folder we called: opencart.interactivewebs.com

image

 

Step 6 – Create an IIS instance to hit that directory.

Using the IIS skills that we suggested you should have. Create a new site that hits the directory you dropped the Upload contents to above.

image

For Windows make sure the following folders and files permissions allow Read and Write.
image/
image/cache/
cache/
download/
config.php
admin/config.php

 

Step 7 – Set the permissions for IIS.

From the Exploring, Right click the folder with the web files in it, and select Security Tab. Modify the permissions for:

IUSR – Modify (you will probably need to add this)

image

IIS_IUSRS(<servername>\IIS_IUSRS) – modify

image

 

Step 8 – Visit the home page.

Visit the store homepage
e.g. http://www.example.com or http://www.example.com/store/

Accept the license

image

Check the permissions you need.

image

Fill in the following details with the relevant information.

image

Using the MYSQL database settings you created above.

image

As per the instruction above, you need to delete the Instillation directory.

image

 

Step 9 – Deleted this directory.

Restart IIS from the command prompt again. “iisreset”

Common problem if permissions are not set correctly.

http://www.opencart.com/index.php?route=documentation/documentation&path=7_57

One thought on “Creating a New OpenCart Deployment on a Windows Server IIS

  1. Pingback: Opencart – HTTP Error 500.50 – URL Rewrite Module Error 0×80070005 Handler StaticFile | InteractiveWebs Blog

Leave a Reply

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