LiteCommerce:Configuration Files and Troubleshooting Tools

From X-Cart 4 Classic
Jump to: navigation, search
Warning.png This article refers to LiteCommerce 2.x only. For user manual to LiteCommerce 3.x, please visit this website.



The main configuration file of your LiteCommerce software installation is 'etc/config.php'. It is a plain text file automatically created during the process of web installation. Typically you would not need to modify the 'etc/config.php' file by hand. Should you need to make changes to the file, you can do so by opening it in any editor capable of editing files in plain text format.

Note: Editing the file requires some background understanding of server administration. Do not edit the 'etc/config.php' file unless you are sure about what you are doing.

The configuration file contains the following parameter groups:

  • [database_details] - MySQL server name and credentials to access the store database. This group also includes the 'persistent' parameter, referring to persistent connections. Persistent connections are links that do not close when the execution of your script ends. When a persistent connection is requested, PHP checks if there's already an identical persistent connection (that remained open from earlier) - and if it exists, it uses it. If it does not exist, it creates the link. An 'identical' connection is a connection that was opened to the same host, with the same username and the same password (where applicable). By default 'persistent' is set to 'Off'.
  • [host_details] - the names of HTTP and HTTPS servers running LiteCommerce software and the location of the store on the web server (web directory).
  • [log_details] - this set contains error logging parameters, including 'suppress_errors' and 'suppress_logging_errors' parameters which affect error logging mechanism. By default both of these parameters are set to 'Off' and whenever an error occurs in the store operation, an error message with full error details is saved in the log file (specified by the 'name' parameter in the 'Logging details' section) and displayed in the browser screen. If the 'suppress_errors' parameter is set to 'On', error messages are saved in the log file, but do not appear in the browser. If a logging error occurs (error message cannot be written to the log file), error notification is displayed in the browser screen unless the 'suppress_logging_errors' parameter is set to 'On', in which case LiteCommerce software stops the operation it was performing and gets redirected to the entry page.

To enable logging, edit the 'Logging details' section: delete the semicolon before "type = file" and add a semicolon before "type = "null".

Note: It is highly recommended that you do not suppress logging error messages, since doing so will complicate troubleshooting should any problems be encountered with your LiteCommerce installation.
  • [HTML_Template_Flexy] - this group contains Flexy template engine configuration parameters, most of which are internal. The 'verbose' parameter defines whether Flexy engine should ('verbose = On') or should not ('verbose = Off') insert comments into HTML code it produces. The comments indicate where and which template files were used to assemble the code.
  • [php_settings] - this group contains only one parameter, 'memory_limit', which defines how much memory PHP engine is allowed to use. By default memory_limit is set to 16 Mb, you can increase or decrease the value to improve productivity.
Note: 'memory_limit' should be increased if you get errors of the following kind: "Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 737280 bytes) (...)" .
  • [installer_details] - this group is located at the end of the file and contains 'auth_code' parameter generated automatically at the time of installation. You will need to provide this code to LiteCommerce installer in case you want to reinstall skin files or reconfigure the default administrator account.
  • [session details], [profiler_details], [recorder], [skin_details] and [decorator_details] groups contain various internal parameters.
  • [filesystem_permissions] - this group allows to define which file permissions should be used. There are two possible permission modes:
0 - means that the non-privileged permissions should be used. One should use this value if the web-user, PHP user and the owner of LiteCommerce files are different.
1 - means that the web-user, PHP user and the owner of the LiteCommerce files is the same. In this case the privileged permissions are used.
The 1 value is more secure, but if you are not sure what web-user and PHP-user are used on your server, you should use the 0 value for this option. If the web-user, PHP-user and the files owner are different users on your server, setting this option to "1" causes problems with displaying the store.
Along with error logging, the possibility to invoke safe mode is another troubleshooting capability of LiteCommerce software. Safe mode disables the initialization and operation of all add-on modules installed at your store, which can be useful when diagnosing unexplainable run-time or configuration errors. To invoke safe mode, use one of the following methods:
  • In the Administrator Zone browse to the 'General settings' section and locate the 'Safe mode' parameter. Place a checkmark in the corresponding field and click on the 'Submit' button at the bottom of the page to save your changes. Doing so switches the store to safe mode. When the safe mode is no longer needed, you can switch the store back to normal operation mode.
  • Add the 'safe_mode=on' parameter to a page URL in the location field of your browser when accessing the Customer Zone. Doing so temporarily disables add-on modules in the current browser session.