LiteCommerce:Config.php

From X-Cart 4 Classic
Revision as of 18:32, 18 January 2010 by Admin (talk | contribs)
Jump to: navigation, search

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.