Friday, October 26, 2007

The Configuration File

The Configuration File

This information covers the configuration file enteries for osCommerce.

Basics—
WS means the Web System path – /catalog/ and /catalog/includes as an example are considered a web path. Normally it is without the URL, which is added within osCommerce.

FS means the File System path on the server where your store is located on—/home/mystore/public_html/ or /home/my store/public_html/catalog/ are considered file system paths

To clarify a common question; when there are two configurations on one line means that the first part is being defined by being appended to the previously defined statement.

For example – define(‘DIR_WS_BOXES’, DIR_WS_INCLUDES . ‘boxes/’); Means that the definition for the boxes Directory Web System path is boxes/ appended to /includes/ to form /includes/boxes/.

Configuration Definitions for a Main Store

The following examples are for a store at http://www.mystore.com/catalog/

HTTP_SERVER – Key Entry

This is the server URL – http://www.mystore.com/

This sets the path for many of the definitions on this configuration file.

Example—define(‘HTTP_SERVER’, ‘http://www.mystore.com);

HTTPS_SERVER – Key Entry

This is the server URL – https://www.mystore.com/

There are many different ways that this could be setup. Many times the hosting company has a shared SSL certificate that you may use as part of your hosting package. For example you might have to use something like https://secure.hostingcompany.com. And place this path in the definition entry.

This sets the path for the SSL URL for this configuration file.

Example—define(‘HTTP_SERVER’, ‘https://www.mystore.com);

ENABLE_SSL – Key Entry

This definition sets the flag to enable SSL for a secure site. If this is set to false, the HTTPS_SERVER and HTTPS_COOKIE_DOMAIN definitions don’t matter. If you have all the correct information to setup SSL, set this to true.

Example – define(‘ENABLE_SSL’, false);

HTTP_COOKIE_DOMAIN – Key Entry

Example – define(‘HTTP_COOKIE_DOMAIN’, ‘www.mystore.com’);

HTTPS_COOKIE_DOMAIN – Key Entry

Example – define(‘HTTPS_COOKIE_DOMAIN’, ‘www.mystore.com’);

HTTP_COOKIE_PATH

Example – define(‘HTTP_COOKIE_PATH’, ‘/’);

HTTPS_COOKIE_PATH

Example – define(‘HTTPS_COOKIE_PATH’, ‘/’);

DIR_WS_HTTP_CATALOG – Key Entry

Example – define(‘DIR_WS_HTTP_CATALOG’, ‘catalog/’);

DIR_WS_HTTPS_CATALOG – Key Entry

Example – define(‘DIR_WS_HTTPS_CATALOG’, ‘catalog/’);

DIR_WS_IMAGES

Example – define(‘DIR_WS_IMAGES’, ‘images/’);

DIR_WS_ICONS

Example – define(‘DIR_WS_ICONS’, DIR_WS_IMAGES . ‘icons/’);

DIR_WS_INCLUDES

Example – define(‘DIR_WS_INCLUDES’, ‘includes/’);

DIR_WS_BOXES

Example – define (‘DIR_WS_BOXES’, DIR_WS_INCLUDES . ‘boxes/’);

DIR_WS_FUNCTIONS

Example – define(‘DIR_WS_FUNCTIONS’, DIR_WS_INCLUDES . ‘functions/’);

DIR_WS_CLASSES

Example – define(‘DIR_WS_CLASSES’, DIR_WS_INCLUDES . ‘classes/’);

DIR_WS_MODULES

Example – define(‘DIR_WS_MODULES’, DIR_WS_INCLUDES . ‘modules/’);

DIR_WS_LANGUAGES

Example – define(‘DIR_WS_LANGUAGES’, DIR_WS_INCLUDES . ‘languages/’);

DIR_WS_DOWNLOAD_PUBLIC

Example – define(‘DIR_WS_DOWNLOAD_PUBLIC’, ‘pub/’);

DIR_FS_CATALOG – Key Entry

Example – define(‘DIR_FS_CATALOG’, ‘/home/good4u/public_html/’);

DIR_FS_DOWNLOAD

Example – define(‘DIR_FS_DOWNLOAD’, DIR_FS_CATALOG . ‘download/’);

DIR_FS_DOWNLOAD_PUBLIC

Example – define(‘DIR_FS_DOWNLOAD_PUBLIC’, DIR_FS_CATALOG . ‘pub/’);

No comments: