Pre-Installation Steps

Table of Contents

Pre-Installation Steps

osCommerce is a web based solution that needs its relevant files to exist on the web server. The files can be copied to the web server by extracting the download package on your computer and uploading its contents to the web server via FTP, or by copying the download package to the web server directly and extracting its contents there.

Copying the Files to the Web Server

The contents of the download package need to be copied to the public HTML directory the web server is serving from.

Examples of public HTML directories are:

  • /home/scott/public_html/
  • /srv/www/htdocs/
  • /usr/local/htdocs/
  • /var/www/vhosts/domain.com/httpdocs/

The contents of the download package once extracted is:

  • oscommerce/
  • readme.txt
  • license.txt

Using FTP to Copy the Download Package Contents to the Web Server

Once osCommerce has been downloaded to your computer, it must be extracted to reveal its contents. The oscommerce directory must be copied to the public HTML directory. This can be achieved on most FTP clients by simply dragging the oscommerce directory from your local file browser pane to the remote pane listing the files on your web server.

Directly Extracting the Download Package on the Web Server

Once osCommerce has been downloaded on the web server, it must be extracted to reveal its contents. The oscommerce directory must be copied to the public HTML directory.

This can be achieved with the following command:

cp -R oscommerce /path/to/public/html/directory/

File and Directory Permissions

The following file and directory permissions need to be writable by the web server:

Files Web Server Writable
oscommerce/includes/configure.php

The oscommerce/includes/configure.php file must have its web server writable permission removed after the installation procedure has completed successfully.

Directories Web Server Writable
oscommerce/admin/images/graphs
oscommerce/images/banners
oscommerce/images/categories
oscommerce/images/manufacturers
oscommerce/images/products
oscommerce/includes/work

Please consult with your hosting provider to find out the permission flag to use to allow the web server to have write permissions to files and directories.

In some cases a world write permission flag of 777 can be used but may lead to an insecure installation of osCommerce.

Changing the file and directory permissions can be performed by most FTP clients or directly on the server.

Using FTP to Change File and Directory Permissions

Most FTP clients are capable of changing file and directory permissions on the server. This is commonly performed by right-clicking on the file or directory and selecting "Properties" or "Attributes" on the context menu.

The file or directory permissions can be changed by allowing all users to read, write, and execute the file or directory, or by manually entering the world readable and world writable flag of 777.

Changing File and Directory Permissions Directly on the Server

Changing file and directory permissions directly on the server can be performed with the following command:

chmod -R 777 /path/to/public/html/directory/oscommerce/file_or_directory

Database

A database on the database server needs to exist for the installation procedure to be able to successfully import the database table structure and required data settings.

A table name prefix can be provided during the installation procedure if an already existing database is to be used. Using a unique table name prefix will prevent conflicts with existing tables in the database.

Web Server and Database Server Details

The following web server and database server details are required during the installation procedure. Please consult your hosting provider if these details are not known.

Web Server Details

Setting Description Possible Value
Server Address The web address to the online store. http://www.example.com/oscommerce/
Root Directory The directory where the online store is installed on the server. /home/scott/public_html/oscommerce/
Work Directory The working directory for temporarily created files. /home/scott/oscommerce_work/

Database Server Details

Setting Description Possible Value
Server Address The address of the database server in the form of a hostname or IP address. localhost
Username The username used to connect to the database server. scott
Password The password that is used together with the username to connect to the database server. tiger
Database Name The name of the database to hold the data in. oscommerce
Database Type The database server software that is used. MySQL
Table Prefix The prefix to use for the database tables. osc_
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.