Install osCommerce on IIS
by Eric Woersching
OsCommerce is an open-source online shopping and e-commerce solution that is available for free under the GNU General Public License. It features a rich set of online shopping cart functionality that lets users set up, run, and maintain their online stores with minimal effort and with no costs, fees, or limitations.
For more information about osCommerce, visit the osCommerce Web site.
This article describes how to install and configure osCommerce for use with the FastCGI extension on Internet Information Services 7 (IIS 7) and above and on Windows Server® 2008 R2. The instructions assume that you have set up and configured the FastCGI extension and the PHP libraries.
Download and Unpack the Application
First, download the latest stable release of osCommerce. For this article, oscommerce-2.2ms2-060817 was used. Uncompress the osCommerce files and copy the files in the "catalog" folder to
Set the permissions on the osCommerce/include/Configure.php file to read, write, and execute. (If these permissions are not set correctly, you get an error message.)
Before running the osCommerce installer, grant "Write" permissions to the Configure.php file.
C:\inetpub\wwwroot\oscommerce\catalog\includes>icacls configure.php /grant BUILTIN\IIS_IUSRS:W C:\inetpub\wwwroot\oscommerce\catalog\admin\includes>icacls configure.php /grant BUILTIN\IIS_IUSRS:W
Set Up the Database
Before starting the installation procedure for osCommerce, you must create a database on your server. Also create a user and grant this user "db ownership" permission to the database.This article uses the following database information:
- Database name: oscommerce
- Database user: oscommerceuser
- Account password: oscommerce
Set Up and Configure the Application
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
- Start the configuration procedure in a Web browser. Go to
http://www.my-server.com/osCommerce/catalog. (If the Index.php file is not in the browser default document, then add it.)
Click on the installation link on the top of the page to redirect to the Install Wizard. The welcome page appears on the Web browser, and the configuration procedure can be started by clicking Continue.
Figure 1: Welcome screen
Next, provide details for the osCommerce database that you have created. Click Continue.
Figure 2: Database import
You can now accept the default settings; or you can change the URL in the WWW Address box and change the path in the Webserver Root Directory box. Click Continue.
Figure 3: Database import was successful
Provide the information for your new Online Store, and then click Continue.
Figure 4: osCommerce configuration
The following message appears after a successful installation.
Figure 5: osCommerce configuration successful
After installing osCommerce, follow these steps to make your application secure and functional.
- Rename or delete the osCommerce/install folder.
- Reset the permissions on osCommerce/includes/configure.php to read and execute.
- Set the permissions on the osCommerce/images directory to read, write, and execute.
- Set the permissions on the admin/images/graphs directory to read, write, and execute.
- Create the directory admin/backups and set the permissions to read, write, and execute. (Save the database backup of your store in the "Tools" section of store administration in the admin/backups directory).
To test that osCommerce was successfully installed, try to chat with an operator to obtain support:
Figure 6: osCommerce page
Shop by selecting the items available in the left panel.
Figure 7: Shop at osCommerce
This article updates " osCommerce on IIS" by Eric Woersching, published on October 24, 2008.