diff --git a/includes/common.php b/includes/common.php index c698d4d..2a7a533 100755 --- a/includes/common.php +++ b/includes/common.php @@ -86,7 +86,7 @@ function kleeja_show_error($error_number, $error_string = '', $error_file = '', echo '.error {color: #333;background:#ffebe8;float:left;width:73%;text-align:left;margin-top:10px;border: 1px solid #dd3c10; padding: 10px;font-family:tahoma,arial;font-size: 12px;}' . "\n"; echo "\n\n\n\t" . '
' . "\n\n\t\t

Kleeja error :


" . "\n"; echo "\n\t\t [ " . $error_number . ':' . basename($error_file) . ':' . $error_line . ' ]

' . "\n\t\t" . $error_string . "\n\t"; - echo "\n\t\t" . '

Visit Kleeja Website for more details.' . "\n\t"; + echo "\n\t\t" . '

Visit Kleeja Website for more details.' . "\n\t"; echo "
\n\n"; global $SQL; @@ -147,9 +147,21 @@ if (! is_bot() && PHP_SESSION_ACTIVE !== session_status() && ! headers_sent()) //no enough data if ((empty($dbname) || empty($dbuser)) && ($dbtype !== 'sqlite')) { - header('Location: ./install/index.php'); + $install_file_url = (defined('IN_ADMIN') ? '.' : '') . './install/index.php'; + if (file_exists(PATH . '/install/index.php')) { + header("Location: {$install_file_url}"); + exit; + } + + kleeja_show_error( + '', + "There is no (install) folder, and the config file is not correct", + 'includes/common.php', + __LINE__ + ); exit; + } // solutions for hosts running under suexec, add define('HAS_SUEXEC', true) to config.php.