-
Notifications
You must be signed in to change notification settings - Fork 7
Configuration (config.php & define.php)
This page details the various options in the ( config/config.php ) and ( config/define.php ) files.
=== Note: === Refer to custom.config.php for recommendation on its use rather than making modifications to the config.php included with the SimpleInvoices download.
The database section details your database connection parameters.
database.adapter = pdo_mysql
database.utf8 = true
database.params.host = localhost
database.params.username = root
database.params.password =
database.params.dbname = simple_invoices
database.params.port = 3306
Options | Description | Note | |
---|---|---|---|
adapter | Default is pdo_mysql | ||
utf8 | Default is true. | For problems with non-latin characters set inputted data change this to false and retry | |
host | Simple Invoices database server name. | This is normally localhost | |
username | The username to connect to your database | ||
password | The password for the above user | ||
dbname | Simple Invoices database name. | eg., simple_invoices | |
port | The default MySQL port is 3306. | If your instance is different enter it here |
The authentication section details your web access mode.
authentication.enabled = false
authentication.http =
Options | Description | Note |
---|---|---|
enabled | Authentication is disabled by default, Enter true to turn it on. | Default username is the email [email protected] and password is demo |
http | enter true to use Apache's .htpasswd system. | Its up to you to create the .htpasswd file |
The export section details your document export parameters.
export.spreadsheet = xls
export.wordprocessor = doc
export.pdf.screensize = 800
export.pdf.papersize = A4
export.pdf.leftmargin = 15
export.pdf.rightmargin = 15
export.pdf.topmargin = 15
export.pdf.bottommargin = 15
Options | Description | Note |
---|---|---|
.spreadsheet | Enter 'xls' for MS Excel export, use 'ods' for Open Document export | |
.wordprocessor | Enter 'doc' for MS Word export, use 'odt' for Open Document export | |
.pdf.screensize | Screen resolution for PDF | |
.pdf.papersize | Papersize for PDF. Can be A4, Letter, etc.. | |
.pdf.leftmargin | Left indent margin width | |
.pdf.rightmargin | Right indent margin width | |
.pdf.topmargin | Top indent margin width | |
.pdf.bottommargin | Bottom indent margin width |
The local. section details your localisations.
local.locale = en-gb
local.precision = 2
Options | Description | Note |
---|---|---|
.locale |
This sets the location dependent (date, money, numbers, etc..) formatting used in Simple Invoices. Refer: List of all Locales in PHP |
|
.precision | This is the number of decimal places to format numbers with. Default is 2 |
The email.. section details email send settings.
email.host = localhost
email.smtp_auth = false
email.username =
email.password =
email.smtpport = 25
email.secure =
email.ack = false
Options | Description | Note |
---|---|---|
host | The server name of your outgoing email server. | This is normally 'localhost' |
smtp_auth | Enter true if your outgoing email server requires a username and password to send | |
username | The username if smtp_auth is true | |
password | The password if smtp_auth is true | |
smtpport | The port number for the mail server. | Default is 25, use 465 for secure ssl |
secure | Email security type | Default is blank, others are ssl or tls |
ack | For read receipt of the email set this to true |
The debug level. used within Simple Invoices
debug.level = All
Options | Description | Note |
---|---|---|
level |
None is Off All is On |
The error. section sets the PHP error reporting level in SimpleInvoices.
debug.error_reporting = 0
Some of the main ones to use are
Error_reporting level | Description |
---|---|
0 | Turn off errors |
-1 | Show all errors - same as E_ALL |
E_STRICT | PHP interoperability and compatibility errors |
E_ERROR | Show simple running errors |
phpSettings.date.timezone = UTC
Set this to your timezone, UTC is the default. Refer: List of all PHP Time Zones.
This sets the php settings for displaying errors and startup errors.
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
Options | Description |
---|---|
0 | Off |
1 | On |
version.name = 2009.1
Details the version of Simple Invoices that you are using
If $environment is not = "production" then this allows you to have another local config file for your dev or other purposes ie., dev.config.ini
Any settings in this extra config.ini file (which will not be kept in SVN/GitHub) will overwrite config.ini values
This way, everyone can have there own config setting without messing with anyone else's settings.
/*
RELEASE TODO: make sure $environment is set back to live
*/
$environment = "dev"; //test,staging,dev,live etc..
define("TB_PREFIX","si_"); // default table prefix si_ - Old variable: $tb_prefix = "si_";