Skip to content

config.php file

Abdulrahman ☕️ edited this page May 30, 2019 · 4 revisions

One of the most important files in your Kleeja installation is the config.php file. This file is located in the root of your Kleeja file directory and contains your website's base configuration details, such as database connection information.

Where is config.php

When you first download Kleeja, the config.php file isn’t included. The Kleeja Installation process will create a config.php file for you based on the information you provide.

Creating config.php manually.

You can manually create a config.php file by copying the simple code below (We recommend that you don't do this manually and follow the installation process to generate this file automatically):

<?php
$dbserver        = 'localhost'; //database server
$dbuser            = 'user' ; // database user
$dbpass            = 'pass'; // database password
$dbname            = 'kleeja'; // database name
$dbprefix        = 'klj_'; // prefix for table names

From Kleeja 3.1.0 you can use $dbtype = 'sqlite'; to use SQLite database driver instead of MySQL.

Advanced Options

Kleeja offers many hidden settings to make Kleeja works the best for you. and to solve some issues that are encountered by some users.

Note: Use only if needed. How to use: copy the wanted code and paste it and the end of config.php file.

Code Description
defined('MAKE_DOPHP_301_HEADER', true); use header 301 redirection to download files directly. (helps with performance)
define('DEV_STAGE', true); Enable development mode (for developers)
define('STOP_PLUGINS', true); Disable plugins system, so you can delete corrupted plugins or disable them.
define('STOP_CAPTCHA', true); Disable CAPTCHA system if you are having issues.
define('TIME_FORMAT', 'd-m-Y h:i a'); Change the date format in Kleeja to what you like.
define('DISABLE_INTR', true); Disable user system integration with other web apps.
define('FORCE_COOKIES', true); if having login issue due to cookies setting.
$config_cookie_name = ''; $config_cookie_domain = ''; $config_cookie_secure = ''; $config_cookie_path = ''; or use one of these cookies setting individually.
define('STOP_CSRF', true); It will add another security layer to the Kleeja control panel.
define('ACP_IMAGES_PER_PAGE', 20); Number of images per page in Kleeja control panel.
define('ACP_FILES_PER_PAGE', 20); Number of files per page in Kleeja control panel.
define('HAS_SUEXEC', true); solution for hosts running under suexec.
You can’t perform that action at this time.