--- cpg145/install.php 2006-05-01 13:05:17.582794094 +0300
+++ cpg145/install.php 2006-05-01 13:29:35.775346224 +0300
@@ -339,14 +339,14 @@
MySQL Database Name
|
-
+
|
MySQL Username
|
-
+
|
@@ -360,7 +360,7 @@
MySQL table prefix (default value is OK; do not use dots!)
|
-
+
|
@@ -376,7 +376,7 @@
ImageMagick path
|
-
+
|
@@ -472,8 +472,8 @@
$sql_query .= "REPLACE INTO CPG_config VALUES ('gallery_admin_email', '{$_POST['admin_email']}');\n";
// Test write permissions for main dir
if (!is_writable('.')) {
- $sql_query .= "REPLACE INTO CPG_config VALUES ('default_dir_mode', '0777');\n";
- $sql_query .= "REPLACE INTO CPG_config VALUES ('default_file_mode', '0666');\n";
+ $sql_query .= "REPLACE INTO CPG_config VALUES ('default_dir_mode', '0300');\n";
+ $sql_query .= "REPLACE INTO CPG_config VALUES ('default_file_mode', '0600');\n";
}
// Update table prefix
$sql_query = preg_replace('/CPG_/', $_POST['table_prefix'], $sql_query);
@@ -536,10 +536,12 @@
set_magic_quotes_runtime(0);
// The defaults values
$table_prefix = $_POST['table_prefix'];
-$DFLT = array('cfg_d' => 'include', // The config file dir
- 'lck_f' => 'include/install.lock', // Name of install lock file
- 'cfg_f' => 'include/config.inc.php', // The config file name
- 'alb_d' => 'albums', // The album dir
+$webapps_dir = '/etc/webapps/coppermine-gallery';
+$var_dir = '/var/lib/coppermine-gallery';
+$DFLT = array('cfg_d' => $webapps_dir, // The config file dir
+ 'lck_f' => "$webapps_dir/install.lock", // Name of install lock file
+ 'cfg_f' => "$webapps_dir/config.inc.php", // The config file name
+ 'alb_d' => "$var_dir/albums", // The album dir
'upl_d' => 'userpics', // The uploaded pic dir
'edit_d' => 'edit',
'sql_d' => 'sql'
--- cpg145/include/init.inc.php 2006-05-01 13:37:00.735274303 +0300
+++ cpg145/include/init.inc.php 2006-05-01 13:54:20.578477527 +0300
@@ -150,9 +150,9 @@
define('CRITICAL_ERROR', 3);
// Include config and functions files
-if(file_exists('include/config.inc.php')){
+if (file_exists('/etc/webapps/coppermine-gallery/config.inc.php') and filesize('/etc/webapps/coppermine-gallery/config.inc.php') > 0) {
ob_start();
- require_once 'include/config.inc.php';
+ require_once '/etc/webapps/coppermine-gallery/config.inc.php';
ob_clean();
} else {
// error handling: if the config file doesn't exist go to install