Skip to content

Commit 1d81efd

Browse files
committed
cleanup in config file. The path is now detected automatically.
1 parent 158b339 commit 1d81efd

File tree

1 file changed

+33
-34
lines changed

1 file changed

+33
-34
lines changed

interface/lib/config.inc.php

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/*
3-
Copyright (c) 2005, Till Brehm, Falko Timme, projektfarm Gmbh
3+
Copyright (c) 2007, Till Brehm, Falko Timme, projektfarm Gmbh
44
All rights reserved.
55
66
Redistribution and use in source and binary forms, with or without modification,
@@ -37,40 +37,39 @@
3737
$conf["app_version"] = "3.0.0";
3838

3939

40-
$conf["rootpath"] = "D:\\server\\www\\ispconfig3_ajax\\interface";
41-
//$conf["rootpath"] = "D:\\www\\ispconfig3\\interface";
42-
//$conf["rootpath"] = "/home/www/ispconfig3/web/cms";
43-
44-
$conf["fs_div"] = "\\"; // File system divider, \\ on windows and / on linux and unix
45-
$conf["classpath"] = $conf["rootpath"].$conf["fs_div"]."lib".$conf["fs_div"]."classes";
46-
$conf["temppath"] = $conf["rootpath"].$conf["fs_div"]."temp";
47-
48-
49-
define("DIR_TRENNER","\\");
50-
define("SERVER_ROOT","D:\\server\\www\\ispconfig3_ajax\\interface");
51-
define("INCLUDE_ROOT",SERVER_ROOT.DIR_TRENNER."lib");
52-
define("CLASSES_ROOT",INCLUDE_ROOT.DIR_TRENNER."classes");
53-
5440
/*
5541
Database Settings
5642
*/
5743

58-
define("DB_TYPE","mysql");
59-
define("DB_HOST","localhost");
60-
define("DB_DATABASE","ispconfig3");
61-
define("DB_USER","root");
62-
define("DB_PASSWORD","");
63-
64-
65-
66-
6744
$conf["db_type"] = 'mysql';
6845
$conf["db_host"] = 'localhost';
6946
$conf["db_database"] = 'ispconfig3';
7047
$conf["db_user"] = 'root';
7148
$conf["db_password"] = '';
7249

7350

51+
/*
52+
Path Settings (Do not change!)
53+
*/
54+
55+
$conf["rootpath"] = substr(dirname(__FILE__),0,-4);
56+
$conf["fs_div"] = "/"; // File system divider, \\ on windows and / on linux and unix
57+
$conf["classpath"] = $conf["rootpath"].$conf["fs_div"]."lib".$conf["fs_div"]."classes";
58+
$conf["temppath"] = $conf["rootpath"].$conf["fs_div"]."temp";
59+
60+
61+
define("DIR_TRENNER",$conf["fs_div"]);
62+
define("SERVER_ROOT",$conf["rootpath"]);
63+
define("INCLUDE_ROOT",SERVER_ROOT.DIR_TRENNER."lib");
64+
define("CLASSES_ROOT",INCLUDE_ROOT.DIR_TRENNER."classes");
65+
66+
define("DB_TYPE",$conf["db_type"]);
67+
define("DB_HOST",$conf["db_host"]);
68+
define("DB_DATABASE",$conf["db_database"]);
69+
define("DB_USER",$conf["db_user"]);
70+
define("DB_PASSWORD",$conf["db_password"]);
71+
72+
7473
/*
7574
External programs
7675
*/
@@ -83,9 +82,9 @@
8382
Themes
8483
*/
8584

86-
$conf["theme"] = 'default';
85+
$conf["theme"] = 'default';
8786
$conf["html_content_encoding"] = 'text/html; charset=iso-8859-1';
88-
$conf["logo"] = 'themes/default/images/mydnsconfig_logo.gif';
87+
$conf["logo"] = 'themes/default/images/mydnsconfig_logo.gif';
8988

9089
/*
9190
Default Language
@@ -98,20 +97,20 @@
9897
Auto Load Modules
9998
*/
10099

101-
$conf["start_db"] = true;
100+
$conf["start_db"] = true;
102101
$conf["start_session"] = true;
103102

104103
/*
105104
DNS Settings
106105
*/
107106

108-
$conf["auto_create_ptr"] = 1; // Automatically create PTR records?
109-
$conf["default_ns"] = 'ns1.example.com.'; // must be set if $conf['auto_create_ptr'] is 1. Don't forget the trailing dot!
110-
$conf["default_mbox"] = 'admin.example.com.'; // Admin email address. Must be set if $conf['auto_create_ptr'] is 1. Replace "@" with ".". Don't forget the trailing dot!
111-
$conf["default_ttl"] = 86400;
112-
$conf["default_refresh"] = 28800;
113-
$conf["default_retry"] = 7200;
114-
$conf["default_expire"] = 604800;
107+
$conf["auto_create_ptr"] = 1; // Automatically create PTR records?
108+
$conf["default_ns"] = 'ns1.example.com.'; // must be set if $conf['auto_create_ptr'] is 1. Don't forget the trailing dot!
109+
$conf["default_mbox"] = 'admin.example.com.'; // Admin email address. Must be set if $conf['auto_create_ptr'] is 1. Replace "@" with ".". Don't forget the trailing dot!
110+
$conf["default_ttl"] = 86400;
111+
$conf["default_refresh"] = 28800;
112+
$conf["default_retry"] = 7200;
113+
$conf["default_expire"] = 604800;
115114
$conf["default_minimum_ttl"] = 86400;
116115

117116
?>

0 commit comments

Comments
 (0)