Important: For critical security reasons the old config.php is never in use from WB 2.8.4!
All configuration settings are stored now in the file setup.ini.php. For backward compatibility the old config.php will be used as simply forwarding to /framework/initialize.php for a short time.
The old global constants DB_TYPE, DB_HOST, DB_USERNAME, DB_PASSWORD, DB_NAME are removed and also no longer available.
The new workflow is:
read the configuration -> instantiate and connect the default database object -> unset all database configuration vars.
The format/syntax of the new config file is a simple text file using the easy to understand 'ini' syntax.
No more PHP-codes or something else to take care for.
Here is an example for the new configuration file:
;################################################
;<?php die('illegal file access'); ?>
;################################################
;
[Constants]
DEBUG = true
AppUrl = "http://domain.tld/wb/"
AcpDir = "admin/"
;
[DataBase]
type = "mysql"
user = "dummyuser"
pass = "my!secret"
host = "localhost"
socket = ""
port = "3306"
name = "mydatabase"
charset = "utf8"
table_prefix = "wb_"
;
;################################################
In same pass the connect method of WbDatabase changes into the standard DSN style like:
<?php
doConnect(string $sDsn = '', string $sUser = '', string $sPassword = '', array $aAttributes = array()) : bool
?>
Attention: This changes first time will be published in version 2.8.4.
Also from this revision the installer and the upgrade script will handle the new formatting completely.
For the users there will be no difficult changes or special attention.
Important hint:
We've seen some code which includes the /config.php or /index.php in a circular manner. This is definitely NOT a desired kind of coding! We urgently ask all authors to correct their modules accordingly!!
WB-2.8.4 will NOT accept this kind of coding!!