The config file

The Backend, which was described in the last chapter, is the recommended way to setup your settings. You may of course change the settings in the config file if you like to. The config file is named config.json. Take a look at it to get an impression.

When changing the config file, be aware that a changed version you upload will overwrite the existing one. So it is recommended to download the latest version before changing anything in order to not loose your current settings.

Here come some explanations about the options. They are sorted the way you will find them in the config file. The bold values stand for the default settings.

JSON syntax

Whenever you make a change to the config file, be aware that the file has to consist of valid JSON. You can read more about JSON at w3schools. Make sure to put a backslash in front of the double-quotes which are meant to be within a value. The backend will of course handle this for you.

The configuration component

To access settings within your code, make use of blaze's settings component.


Main options

publicaccess / false or true

When publicaccess is enabled, the website is available to public visitors. If not, they will be requested to login. Username/password with role 'guest' will not work.

The setting is available on the main setting screen.

customeraccess / true or false

When customeraccess is enabled, users with role 'customer' will be granted access to the website even if customeraccess is disabled. Of course they will have to login first.

The setting is available on the main setting screen.

maintenancemode / false or false

When maintenancemode is enabled, all visitors will see a 'site under maintenance' message. The page is still accessible, but only to users with role 'admin'.

The setting is available on the main setting screen.

debug / true or false

This is one of the most powerful setting options. If enabled, the asset compiler will not concatenate the assets but instead it will place them as single assets in the source code. This way, the code is much easier to debug. Also the debug mode prevents html compression and output caching, even if they are enabled.

When disabled, the asset compiler will concatenate and minify your assets, allowing output caching and compression.

Error handling is also controlled by the debug mode. If debug mode is enabled, all php errors will result in an error page with explanations. If disabled, errors will silently pass (if they are not fatal) and the site admin (set in adminmail) will be notified via email.

The setting is available on the main setting screen.

errorhandling / 'display' or 'email'

This option is not available in the backend. It will be set automatically depending on the debug option and some other circumstances.

If set to display, errors will be displayed in an error message. If set to email, the site admin (set in adminmail) will be notified via email. If you are logged in as a user with role 'admin', errors will always be shown to you.

Read more about this over at error handling.

adminmail / any valid email address

Error messages will be sent to this email address if the page is not in debug mode or errorhandling is set to email.

This email address is not sent anywhere, nor is it exposed anywhere on the site if you don't expose it by yourself.

The setting is available on the main setting screen.

gzip / true or false

If enabled, blaze will send out your sourcecode gzipped. Only disable if for some reason you encounter problems with gzipping.

This setting is not available in the backend. Change it directly in the config file if you need to.

outputcompression / false or true

If outputcompression is enabled, blaze will do everything to reduce the loading times of your frontend. The compiled sourcecode will be minified (even html), the asset compiler will inline your CSS and Javascript into the rendered html sourcecode as long at the total filesize is not bigger than 50KB per file. If debug mode is enabled, outputcompression will be ignored.

Read more about this over at output manipulation.

This setting is available on the main setting screen.

prettyprint / true or false

If prettyprint is enabled, blaze will try to properly indent your rendered output. It is very helpful when working with php includes or unclean html code.

Read more about this over at output manipulation.

This setting is available on the main setting screen.

outputcaching / false or true

If outputcaching is enabled, blaze will only render your sourcecode once and store the compiled output in the file storage. This reduces output times even further and improves your website's performance. If debug mode is enabled, this setting will be ignored.

Read more about this over at output caching.

This setting is available on the main setting screen.

usecssreset / true or false

If usecssreset is enabled, blaze will add a general CSS reset to the assets of your site. It is recommended to use this in combination with the unreset option, but feel free to do whatever you want.

This setting is available on the main setting screen.

usecssunreset / true or false

If usecssunreset is enabled, blaze will add a CSS unreset to the assets of your site. It is highly recommend to not use this feature without using the reset option.

This setting is available on the main setting screen.

errorpagedevinfo / false or true

If enabled, some information about your used php version and your installed php extensions will be added to the error pages. The information is encoded and should be only used for support purposes. Enable this feature if you need support from us and we tell you to do so. We will be able to decode the string.

This setting is available on the main setting screen.

softcron / true or false

This setting enables a plugin event, which will be triggered once a day (max) by the visitors of your site. It may be used by plugins (like the webstat plugin) and should only be disabled if you are sure you don't need it.

It is recommended to provide a real cronjob. See the event documentation to learn more.

This setting is available on the main setting screen.


UI settings

The ui settings are there to help you brand the framework. This way, you can make blaze look like your product for your customer. Read more about those options in the branding section.

loginpath / 'blaze' or any string

You can set the login path for the backend. By default, you access blaze's backend with this path: yourwebsite.com/blaze. You may enter anything that is a valid url. Don't use whitespaces or slashes.

The setting is available in the interface section of the backend.


Presets

The presets are there to make your life easier. Read more about them in the preset section.


Database settings

The database settings are best set via the backend. Depending on the database type you want to use, you need to set a different number of the available options.

The database handler relies on these settings, so you should take a look at the database component documentation.

use / false or true

If set to true, the database will be initialized as a php object within blaze. You should only enable this setting, if you really are using a database.

type / 'mysql' or 'sqlite'

The database type to use. If you set this to 'sqlite', blaze will create a SQLite database within the folder data.

host / string, could f.i. be 'localhost'

username / string

password / string

database / string

The database connection credentials. Needed for MySQL connection.


Users

Read more about users in the security section.