Skip to content

Commit 4766e9e

Browse files
author
pedro_morgan
committed
* Introducing the sb_local.php.skel file to keep a local configuration
1 parent ce06f4c commit 4766e9e

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

interface/lib/config.inc.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828
*/
2929

30+
error_reporting(E_ALL|E_STRICT);
31+
3032
header('Pragma: no-cache');
3133
header('Cache-Control: no-store, no-cache, max-age=0, must-revalidate');
3234
header('Content-Type: text/html');
@@ -69,20 +71,20 @@
6971
*/
7072

7173
//** Detect for local database setting or set and load default params
72-
if( file_exists('db_local.php') ){
73-
require_once('db_local.php');
74+
if(file_exists(dirname(__FILE__).'/db_local.php')){
75+
require_once(dirname(__FILE__).'/db_local.php');
7476
$conf['db_type'] = $DB['type'];
7577
$conf['db_host'] = $DB['host'];
76-
$conf['db_database'] = $DB['database'];
7778
$conf['db_user'] = $DB['user'];
7879
$conf['db_password'] = $DB['password'];
80+
$conf['db_database'] = $DB['database'];
7981
}else{
8082
//** Database Settings
8183
$conf['db_type'] = 'mysql';
8284
$conf['db_host'] = 'localhost';
83-
$conf['db_database'] = 'ispconfig3';
8485
$conf['db_user'] = 'root';
8586
$conf['db_password'] = '';
87+
$conf['db_database'] = 'ispconfig3';
8688
}
8789

8890

interface/lib/db_local.php.skel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
//** These are the local connection paramaters on your machine
4+
$DB['type'] = 'mysql';
5+
$DB['host'] = 'localhost';
6+
$DB['user'] = 'root';
7+
$DB['password'] = 'mash';
8+
$DB['database'] = 'ispconfig';
9+
?>

0 commit comments

Comments
 (0)