Updating The Configure.php Files

 

Updating Configure.php files :

Whenever you move your host, change domain name, change the doc root path of your server or there is any change in the database details. You must  update the configure.php files with the updated details, else you cart will fail to load and will throw the error.  The paths of the configure.php files are ,

Cart Configure.php
includes/configure.php

Admin Configure.php
admin/includes/configure.php

Cart Configure File : This file has all details  paths, DB connection detail that will be used at cart front end. Below are the details of the configure.php file of store front end.

 

The first section consist of your actual domain / URL that you use to access your cart, SSL support and the path of the cart on the server.

  • define('HTTP_SERVER', 'http://www.yourdomain.com') : This is the first entry of the configure.php and here you specify your actual domain name,IP address or any temp URL that you will use to access the cart.
  • define('HTTPS_SERVER', 'https://www.yourdomain.com'): This is second entry and here you will update your SSL URL, please note that update this define only if you have a valid SSL for your domain or your temp URL, else it will throw error of domain not found and your cart will fail on all pages which use SSL or HTTPS protocal.
  • define('ENABLE_SSL', true): You need to set itto true or false depending on if you want to use SSL or not.
  • define('HTTP_COOKIE_DOMAIN', 'yourdomain.com'): here you will specify your cookie domain entry, this must match the 'HTTP_SERVER'entry, if you are using domain name with www in 'HTTP_SERVER', then you must specify cookie domain with www. Missing valid cookie domain will result in issue with session state on the cart.
  • define('HTTPS_COOKIE_DOMAIN', 'yourdomain.com'): It is same to 'HTTP_SERVER' only difference is you must add your 'HTTPS_SERVER' domain here.
  • define('HTTP_COOKIE_PATH', '/'): here you will specify the cookie path, bydefault it will be set to '/' if you have the cart installed in document root folder of your server, else you need to specify the folder name in which yiou have installed your cart and replace it with '/'.
  • define('HTTPS_COOKIE_PATH', '/'): Copy down the same entry of HTTP_COOKIE_PATHhere.
  • define('DIR_WS_HTTP_CATALOG', '/'): This will be set to '/' by default unless you have the cart installed in any subfolder, then you must specify the subfolder name instaed of '/'.
  • define('DIR_WS_HTTPS_CATALOG', '/'): Copy down the entry of 'DIR_WS_HTTP_CATALOG'here.
  • define('DIR_WS_IMAGES', 'images/'): The default image folder is /images, donot edit this entry unless you want some other folder for images of the cart.
  • define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'): The default folder for icon image is icons. Same as images donot edit this entry.
  • define('DIR_WS_INCLUDES', 'includes/'): Donot edit this entry.
  • define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'): Donot edit this entry.
  • define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'): Donot edit this entry.
  • define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'): Donot edit this entry.
  • define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'): Donot edit this entry.
  • define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'): Donot edit this entry.
  • define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'): Donot edit this entry.

 

The second section of the configure.php consist of following entries,

In the second section you have the template path, and your actual server path defines.

  • define('DIR_WS_TEMPLATES', 'templates/'): Donot edit this entry.
  • define('DIR_WS_CONTENT', DIR_WS_TEMPLATES . 'content/'): Donot edit this entry.
  • define('DIR_WS_JAVASCRIPT', DIR_WS_INCLUDES . 'javascript/'): Donot edit this entry.
  • define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'):Donot edit this entry.
  • define('DIR_FS_CATALOG', '/www/public_html/yourserverpath/'):You need to specify your actual server path here.
  • define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'):Donot edit this entry.
  • define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'):Donot edit this entry.

 

The Third and final section of the configure.php will be your database connection details.

 

  • define('DB_SERVER', 'localhost'): This will be your Mysql hostname.
  • define('DB_SERVER_USERNAME', 'dbuser'): You need to update your Database username.
  • define('DB_SERVER_PASSWORD', 'passowrd'): Here you will update your database user password.
  • define('DB_DATABASE', 'dbname'): The database name goes here.
  • define('USE_PCONNECT', 'false'): Set it to true or false depending of if you use persistent connections.
  • define('STORE_SESSIONS', 'mysql'): leave empty '' for default handler or set to 'mysql'

 

In the admin configure.php file the above defines will be same, with some additional defines as below.

  • define('HTTPS_ADMIN_SERVER', 'https://www.yourdomain.com'): You need to add the same SSL domain name, that you will be using for the cart.
  • define('DIR_WS_HTTP_ADMIN', '/admin/'): This set by default for '/admin/',if you have installed the cart in the document root folder of your cart, if you have installed the cart in any sub folder, you must add the sub folder name before admin, like /subfolder/admin/.
  • define('DIR_WS_HTTPS_ADMIN', '/admin/'):This set bydefault for '/admin/',if you have installed the cart in the document root folder of your cart, if you have installed the cart in any sub folder, you must add the sub folder name before admin, like /subfolder/admin/.
  • define('DIR_FS_ADMIN', '/www/public/admin/'): You must update the absolute path of your server.

 

 

Note:

  • You must take the backup of your configure.php files before editing.
  • The values which are default, do not edit them unless you have your custom folder names.