System configs


All framework configuration files are PHP files. Except for rare exceptions, a configuration file contains PHP code returning a named array of parameters as shown below:

  return array(
      'param_1' => 'value_1',
      'param_2' => 'value_2',

These files reside in directory wa-config/.


File apps.php contains the list of installed applications and allows managing their "visibility" in the main backend menu.

Example of file apps.php:

  return array(
      'contacts' => true,
      'stickies' => true,
      'guestbook' => true,
      'installer' => true

APP_ID's of the installed applications are used as the named array keys. Value true for a key tells the system to display the corresponding application name and icon in the framework backend.


This is the system-wide HTTP request routing configuration file which distributes the entire URL space among applications.

Example of system file routing.php:

  return array(
      '' => array(
          array('url' => 'blog*', 'app' => 'blog'), 	
          array('url' => 'shop*', 'app' => 'shop'), 	
          array('url' => 'guestbook/*', 'app' => 'guestbook'), 	
          array('url' => '*', 'app' => 'site'), 	  

Read more about frontend request routing.


File db.php contains database connection parameters.

Example of file db.php:

  return array(
      'default' => array(
          'type' => 'mysql',
          'host' => 'localhost',
          'user' => 'wafw_user',
          'password' => 'my-strong-password',
          'database' => 'wafw'


File config.php stores several system settings.

Example of file config.php:

  return array(
      'debug' => true,
      'backend_url' => 'admin',
      'mod_rewrite' => true,

Below is the list of parameters used in file config.php:

  • debug: acceptable values are true / false. This parameter enables of disables the display of detailed information on error occurring during the script operation. It is advisable to set this parameter to true during the application development.
  • backend_url: relative path to the backend. Default value is webasyst.
  • mod_rewrite: true or false. This parameter defines whether mod_rewrite rules should be supported. The default value is automatically determined during the framework installation.
  • default_host_domain: default domain that should be used by framework’s system classes in the cases when the framework’s current domain cannot be determined. For instance, when a CLI controller is executed.
  • default_root_url: default root URL that should be used by framework’s system classes in the cases when the framework’s root URL cannot be determined.
  • image_adapter: string ID of the image processing library selected in the system settings.
  • trusted_proxies: array of IP addresses of proxy servers, used by a web-hosting server, with any of which found in the value of the server variable REMOTE_ADDR the real user IP address is determined by alternative means such as server variable HTTP_X_FORWARDED_FOR.
  • disable_mail_ssl_until: string in the format supported by the strtotime() function to denote the date and time until which the verification of SSL certificates is disabled for the connection to email servers. Can be used to temporarily ensure connection to a mail server with broken certificates setup which is known to be safe to use.


File net.php contains default parameters which must be used for connection to remote resources using waNet class.

Template to create a net.php file:

      'timeout'             => 15,
      'verify'              => true,
      'md5'                 => false,
      'log'                 => false,
      'proxy_host'          => null,
      'proxy_port'          => null,
      'proxy_user'          => null,
      'proxy_password'      => null,
      'interface'           => null,
      'priority'            => array(
      'ssl'                 => array(
          'key'      => '',
          'password' => '',
          'cert'     => '',

You need to leave only those entries in this file which you need to override default values from the options in waNet class.

Array items’ descriptions

  • timeout: period of time, in seconds, during with response will be expected from a remote server.
  • verify: whether remote server’s SSL certificate must be verified.
  • md5: whether Content-MD5 header must be sent.
  • log: name of log file to save error messages to.
  • proxy_host: proxy server’s host name.
  • proxy_port: proxy server’s port number.
  • proxy_user: user name to connect to a proxy server.
  • proxy_password: password to connect to a proxy server.
  • interface: name of network interface to be used for connections via curl.
  • priority: array to define the priority of connection methods; the first method in the list, which proves to be supported by a remote server, will be used to send a request.
  • ssl: PEM certificate parameters to be for connections via curl:
    • key: name of file with an SSL key
    • password: password for the PEM certificate
    • cert: name of file with a PEM certificate