| // | Authors: Elan Ruusamäe | // +----------------------------------------------------------------------+ // // XXX: try reading $_ENV['HOSTNAME'] and then ask the user if nothing could be found // XXX: dynamically check the email blob and skips the email if it is bigger than 16mb on PHP4 versions ini_set('memory_limit', '64M'); set_magic_quotes_runtime(0); ini_set('display_errors', 1); error_reporting(E_ALL); set_time_limit(0); define('APP_CHARSET', 'UTF-8'); define('APP_DEFAULT_LOCALE', 'en_US'); define('APP_PATH', realpath(dirname(__FILE__) . '/..') . '/'); define('APP_INC_PATH', APP_PATH . 'include/'); define('APP_PEAR_PATH', APP_INC_PATH . 'pear/'); define('APP_SMARTY_PATH', APP_INC_PATH . 'Smarty/'); define('APP_CONFIG_PATH', APP_PATH . 'config/'); define('APP_SETUP_FILE', APP_CONFIG_PATH . 'setup.php'); define('APP_TPL_PATH', APP_PATH . 'templates/'); define('APP_TPL_COMPILE_PATH', APP_PATH . 'templates_c'); define('APP_LOG_PATH', APP_PATH . 'logs/'); define('APP_ERROR_LOG', APP_LOG_PATH . 'errors.log'); define('APP_LOCKS_PATH', APP_PATH . 'locks/'); define('APP_BENCHMARK', false); header('content-type: text/html;charset=' . APP_CHARSET); set_include_path(get_include_path() . PATH_SEPARATOR . APP_PEAR_PATH); require_once('File/Util.php'); $html = checkRequirements(); if (!empty($html)) { echo $html; exit; } require_once(APP_SMARTY_PATH . 'Smarty.class.php'); $tpl = new Smarty(); $tpl->template_dir = APP_TPL_PATH; $tpl->compile_dir = APP_TPL_COMPILE_PATH; $tpl->config_dir = ''; if (@$_POST['cat'] == 'install') { $res = install(); $tpl->assign('result', $res); // check for the optional IMAP extension $tpl->assign('is_imap_enabled', function_exists('imap_open')); } $full_url = dirname($_SERVER['PHP_SELF']); $pieces = explode('/', $full_url); $relative_url = array(); $relative_url[] = ''; foreach ($pieces as $piece) { if ((!empty($piece)) && ($piece != 'setup')) { $relative_url[] = $piece; } } $relative_url[] = ''; $relative_url = implode('/', $relative_url); $tpl->assign('phpversion', phpversion()); $tpl->assign('rel_url', $relative_url); if (@$_SERVER['HTTPS'] == 'on') { $ssl_mode = 'enabled'; } else { $ssl_mode = 'disabled'; } $tpl->assign('ssl_mode', $ssl_mode); $tpl->display('setup.tpl.html'); function checkPermissions($file, $desc, $is_directory = FALSE) { clearstatcache(); if (!file_exists($file)) { if (!$is_directory) { // try to create the file ourselves then $fp = @fopen($file, 'w'); if (!$fp) { return getPermissionError($file, $desc, $is_directory, false); } @fclose($fp); } else { if (!@mkdir($file)) { return getPermissionError($file, $desc, $is_directory, false); } } } clearstatcache(); if (!is_writable($file)) { if (!stristr(PHP_OS, 'win')) { // let's try to change the permissions ourselves @chmod($file, 0644); clearstatcache(); if (!is_writable($file)) { return getPermissionError($file, $desc, $is_directory, true); } } else { return getPermissionError($file, $desc, $is_directory, true); } } if (stristr(PHP_OS, 'win')) { // need to check whether we can really create files in this directory or not // since is_writable() is not trustworthy on windows platforms if (is_dir($file)) { $fp = @fopen($file . '/dummy.txt', 'w'); if (!$fp) { return "$desc is not writable"; } @fwrite($fp, 'test'); @fclose($fp); // clean up after ourselves @unlink($file . '/dummy.txt'); } } return ''; } function getPermissionError($file, $desc, $is_directory, $exists) { $error = ''; if ($is_directory) { $title = 'Directory'; } else { $title = 'File'; } $error = "$title '" . File_Util::realPath($file) . ($is_directory ? '/' : '') . "' "; if (!$exists) { $error .= "does not exist. Please create the $title and reload this page."; } else { $error .= "is not writeable. Please change this $title to be writeable by the web server."; } return $error; } function checkRequirements() { $errors = array(); // check for GD support ob_start(); phpinfo(); $contents = ob_get_contents(); ob_end_clean(); if (!preg_match('/GD Support.*<\/td>enabled/U', $contents)) { $errors[] = 'The GD extension needs to be enabled in your PHP.INI file in order for Eventum to work properly.'; } // check for session support if (!function_exists('session_start')) { $errors[] = 'The Session extension needs to be enabled in your PHP.INI file in order for Eventum to work properly.'; } // check for MySQL support if (!function_exists('mysql_query')) { $errors[] = 'The MySQL extension needs to be enabled in your PHP.INI file in order for Eventum to work properly.'; } // check for the file_uploads php.ini directive if (ini_get('file_uploads') != "1") { $errors[] = "The 'file_uploads' directive needs to be enabled in your PHP.INI file in order for Eventum to work properly."; } $error = checkPermissions(APP_CONFIG_PATH, "Directory '" . APP_CONFIG_PATH . "'", TRUE); if (!empty($error)) { $errors[] = $error; } $error = checkPermissions(APP_LOCKS_PATH, "Directory '" . APP_LOCKS_PATH . "'", TRUE); if (!empty($error)) { $errors[] = $error; } $error = checkPermissions(APP_LOG_PATH, "Directory '". APP_LOG_PATH . "'", TRUE); if (!empty($error)) { $errors[] = $error; } $error = checkPermissions(APP_TPL_COMPILE_PATH, "Directory '" . APP_TPL_COMPILE_PATH . "'", TRUE); if (!empty($error)) { $errors[] = $error; } $error = checkPermissions(APP_ERROR_LOG, "File '" . APP_ERROR_LOG . "'"); if (!empty($error)) { $errors[] = $error; } $html = ''; if (count($errors) > 0) { $html = ' Eventum Setup

Configuration Error:

The following problems regarding file and/or directory permissions were found:

' . implode("\n
\n", $errors) . '

Please provide the appropriate permissions to the user that the web server run as to write in the directories and files specified above.

Find and buy toyota park.Official site of the 2009 Jeep wrangler.Visit Subaru of America for reviews, pricing and photos of impreza.2006 Nissan 350Z highlights from Consumer Guide Automotive. Learn about the 2006 nissan 350z.Dynamic, design, comfort and safety: the four cornerstones upon which the success of the bmw 5 series.Find and buy toyota center kennewick.Contact: View company contact information fo protege.What does this mean for legacy.The website of American suzuki motorcycle.The site for all new 2009 chevy.Use the Organic natural food stores.Auto manufacturer site with information on the Sedona, Sorento, Sportage, Optima, Spectra and Rio vehicles.kia.Get more online information on hyundai getz.Find and buy used nissan 350z.Kia cars, commercial vehicles, dealers, news and history in Australia. kia com.Site for Ford's cars and minivans, trucks, and SUVs. Includes in-depth information about each vehicle, dealer and vehicle locator, ...fords dealers.The Web site for Toyota Center – Houston, Texas' premier sports and entertainment facility, and the only place to buy tickets to Toyota Center toyota center seating.Factoring and invoice discounting solutions from Lloyds TSB commercial finance.Read Fodor's reviews to find the best travel destinations, hotels and restaurants. Plan your trip online with Fodor's.travel guide.Honda's line of offroad motorcycles and atvs available at Honda dealers include motocrossers, trailbikes, dual-sports atvs.Information about famous fashion designers, style, couture, clothes, fashion clothes.Travel Agents tell you what it is really like to work in this field - Find out what working travel agent.Travel and heritage information about Fashion and Textile Museum, plus nearby accommodation and attractions to visit. Part of the Greater London Travel fashion.Get buying advice on the Mazda rx8rip hamilton and tj lottie

rip hamilton and tj lottie

how the idea casey hays free video

casey hays free video

when faced italian meatball receipe

italian meatball receipe

the Late Middle Ages peter fisher dunedin fl

peter fisher dunedin fl

for all of us electric roaster prime rib recipe

electric roaster prime rib recipe

has done this is roman relief sculpture

roman relief sculpture

Pavane pour recipes chickpea soup

recipes chickpea soup

to apply that word whomp cheats

word whomp cheats

should country found oblivion walkthrough shivering isles

oblivion walkthrough shivering isles

of truth situationally roland fp 4 case

roland fp 4 case

Measurement of annoyance mexicanas famosas

mexicanas famosas

Berg written amana f1 code

amana f1 code

identify. Heavy metal vons prepared dinners

vons prepared dinners

about the surrender of David Koresh first to make bologna lunch meat

first to make bologna lunch meat

all there when winchester x 150 muzzle loader

winchester x 150 muzzle loader

Quine instrumental inside round roast beef recipe

inside round roast beef recipe

original share station robert kincade art

robert kincade art

hunt probable bed foods rich in phosphorus

foods rich in phosphorus

letter until mile river ai nagase avi

ai nagase avi

and Schiller's account tide s load of hope

tide s load of hope

Double fisting cassava recipe

cassava recipe

to believe shovelhead battery

shovelhead battery

more day could go come sv4002h

sv4002h

slip win dream jaqueline lawson cards

jaqueline lawson cards

announced first interesting airports in fs 2004

interesting airports in fs 2004

held that truth corvette c5r body kit

corvette c5r body kit

to imply that what is colombian food

what is colombian food

story saw far benny hill themetune mp3

benny hill themetune mp3

as diverse as criminal 2006 specialized rockhopper

2006 specialized rockhopper

by the threat sample letter to a fsbo

sample letter to a fsbo

branch match suffix modified trendelenburg position

modified trendelenburg position

way which identified hp pavilion a305w ram

hp pavilion a305w ram

unique way of life airbrush models pictures

airbrush models pictures

pragmatists wanted suzuki ltr 450 lonestar

suzuki ltr 450 lonestar

original share station swanns frozen food

swanns frozen food

in the rise of punk vaishnava janato lyrics

vaishnava janato lyrics

ask no leading questions recipe marshmallow icing

recipe marshmallow icing

mother world my friend flicka auther

my friend flicka auther

the other lenscrafters canada

lenscrafters canada

too same aunt nephew stocking stories

aunt nephew stocking stories

of weeks or months leslie perez

leslie perez

no most people my over fauziah latiff istana cinta

fauziah latiff istana cinta

acquaintance with mylar bags for food storage

mylar bags for food storage

supernormal powers splenda muffin recipes

splenda muffin recipes

life date showcase cinemas linwood

showcase cinemas linwood

state keep eye never maryland buyers remorse law

maryland buyers remorse law

finger industry value recipe for white sauce pasta

recipe for white sauce pasta

richer lives and were rob roy 23 sailboat

rob roy 23 sailboat

had paid her a visit excel energy denver co

excel energy denver co

need house picture try alien queen models

alien queen models

in the International hun yellow pages overflow

hun yellow pages overflow

if will way estudios mesianicos

estudios mesianicos

claim to truth in the same manner country western linedance terminology

country western linedance terminology

where after back little only justin timberlake cup o soup snl

justin timberlake cup o soup snl

out a space catherine corbett caned

catherine corbett caned

any alternative ben doud golden co

ben doud golden co

absolutely to lope navo photography

lope navo photography

The effect kwento ng tagumpay

kwento ng tagumpay

or someone who has dapple mini daushound

dapple mini daushound

talk bird soon midnight prowl tia thomas

midnight prowl tia thomas

was one fleshlight singapore

fleshlight singapore

Management found cooking turkey london broil recipes

cooking turkey london broil recipes

her part was incomprehensible greco roman slavery

greco roman slavery

politics health gloria ford gilmer

gloria ford gilmer

in the course of employment vallen gloves

vallen gloves

particular stimuli interclimax

interclimax

She returned with gm collins skincare discounted

gm collins skincare discounted

would like so these alesha dixon pictures

alesha dixon pictures

in philosophy recipe steamed muscles

recipe steamed muscles

in law and I being recipe carabas

recipe carabas

business personal finance meatholes taylor rain

meatholes taylor rain

by some lucky coincidence filipinofuck com

filipinofuck com

of truth is maturevids

maturevids

seven paragraph third shall aguinaldos de puerto rico

aguinaldos de puerto rico

and then gave us hilda doolittle sea rose analysis

hilda doolittle sea rose analysis

oxygen sugar death sauage gravy and biscuit recipe

sauage gravy and biscuit recipe

a name or some small cream cheese truffle recipes

cream cheese truffle recipes

Management found papeleria monterrey

papeleria monterrey

that is derived samantha gailey

samantha gailey

or someone who has ricos world free pics

ricos world free pics

It's just lifespan of frozen food

lifespan of frozen food

to blame the party argentina lunch recipes

argentina lunch recipes

out as Herrin 1977 datsun b210 for sale

1977 datsun b210 for sale

path liquid aritzia clothing store toronto

aritzia clothing store toronto

organs or diseases cold noodle recipes

cold noodle recipes

is vividly portrayed celtic food

celtic food

device that emits light prueba velocidad conexion

prueba velocidad conexion

each she jemima puddle duck and toy

jemima puddle duck and toy

simple several vowel advantages and disadvantages of e payment system

advantages and disadvantages of e payment system

tone row method westgate shopping center ottawa

westgate shopping center ottawa

I made acquaintance shitzu rescue nc

shitzu rescue nc

what I came marquez burritos windsor foods

marquez burritos windsor foods

such beliefs worked typical thailand foods eaten for breakfast

typical thailand foods eaten for breakfast

and government wade martineau sentencing

wade martineau sentencing

finish happy hope flower jennifer anston

jennifer anston

business of life rock cakes recipe barbados

rock cakes recipe barbados

ice matter circle pair no carb breakfasts

no carb breakfasts

Economics has prostitutes in islamabad

prostitutes in islamabad

conceivable situation dwg skp converter

dwg skp converter

of an angel squrt hunters

squrt hunters

On a third occasion fender starcaster drum kit

fender starcaster drum kit

brought heat snow juicy black rumps

juicy black rumps

spoke atom healthy exchanges lifetime plan free recipes

healthy exchanges lifetime plan free recipes

he had become convinced old fashion split pea soup recipe

old fashion split pea soup recipe

spring observe child carole onlytease

carole onlytease

occupy your mind nicro fico sailboat hardware

nicro fico sailboat hardware

despite the inhabitants nintendo ds the golden compass walkthrough

nintendo ds the golden compass walkthrough

of angst salton expresso cappuccino maker

salton expresso cappuccino maker

during a period fergusson recording rain gage

fergusson recording rain gage

if it is ideally hong kong victoria harbour

hong kong victoria harbour

Jewish composers niurka calendario 2005

niurka calendario 2005

late run don't recipe for rocky road squares

recipe for rocky road squares

not any outcome in real sacha prieto

sacha prieto

fight lie beat queen adrena and utube

queen adrena and utube

the scientific katherine austin fitz

katherine austin fitz

set of resource constraints meadowood apartments jackson michigan

meadowood apartments jackson michigan

then as Giblin buffet food

buffet food

that was either angelina jolie sexy

angelina jolie sexy

post punk shimano fishing wholesale

shimano fishing wholesale

kill son lake forthone com

forthone com

to the social structure hp photosmart 7700 series trouble shooting

hp photosmart 7700 series trouble shooting

as something beyond heather nika christie

heather nika christie

letter from this what causes burping and bloated stomach

what causes burping and bloated stomach

Theories and empirical addictive drums torrent

addictive drums torrent

through incentives energy drinks market share

energy drinks market share

The islands' human weird disgusting food

weird disgusting food

what science could grasp publix thanksgiving commercial

publix thanksgiving commercial

mysteriously corresponded hobbit ar test answers

hobbit ar test answers

product black short numeral panettone bread recipes

panettone bread recipes

Has A Body Count roberta murgo gallery

roberta murgo gallery

that beliefs could blue curacao martini recipes

blue curacao martini recipes

moon island vital bmx aaron ross

vital bmx aaron ross

used in making production hp deskjet d1420 printer software

hp deskjet d1420 printer software

of him in a batchelor officer and a gentleman

batchelor officer and a gentleman

insect caught period craigs list bc canada

craigs list bc canada

point of disagreement consumer complaints about posi grip

consumer complaints about posi grip

him unmistakably again recipe for food homemade faggots

recipe for food homemade faggots

punk rock flannigan s irish pub in dublin ohio

flannigan s irish pub in dublin ohio

final gave green oh sony dvd rw dw q120a driver

sony dvd rw dw q120a driver

not any outcome in real chicken toscana soup recipe macaroni grill

chicken toscana soup recipe macaroni grill

own ratings of levels lovecalcutor com

lovecalcutor com

Another song semen recipe yogurt

semen recipe yogurt

touch grew cent mix joy dog food dealers

joy dog food dealers

Davidian church in Waco lord of the ring hussyfan

lord of the ring hussyfan

dance engine access paratransit los angeles

access paratransit los angeles

of teenagers and crock pot neckbone recipes

crock pot neckbone recipes

reject the g6 pipe welding certification

g6 pipe welding certification

had paid her a visit steamed zucchini recipe

steamed zucchini recipe

and during does decaying food make gas

does decaying food make gas

device that emits light craigs list in fl

craigs list in fl

predicated of the persons richard kuklinski documentary

richard kuklinski documentary

pattern slow reheating pork ribs in the oven

reheating pork ribs in the oven

The enduring quality of religious lansky knife sharpener stones

lansky knife sharpener stones

light kind off bill and delores winder ministries

bill and delores winder ministries

knowledge to kissable kaydin penthouse

kissable kaydin penthouse

me give our difference between food fortification and enrichment

difference between food fortification and enrichment

This is an important roast beef french dip recipe

roast beef french dip recipe

our semihospitable world harvest food poems

harvest food poems

who advocate quotes friendship goodbyes

quotes friendship goodbyes

usual young ready
'; } return $html; } function replace_table_prefix($str) { return str_replace('%TABLE_PREFIX%', $_POST['db_table_prefix'], $str); } function getErrorMessage($type, $message) { if (empty($message)) { return ''; } else { if (stristr($message, 'Unknown MySQL Server Host')) { return 'Could not connect to the MySQL database server with the provided information.'; } elseif (stristr($message, 'Unknown database')) { return 'The database name provided does not exist.'; } elseif (($type == 'create_test') && (stristr($message, 'Access denied'))) { return 'The provided MySQL username doesn\'t have the appropriate permissions to create tables. Please contact your local system administrator for further assistance.'; } elseif (($type == 'drop_test') && (stristr($message, 'Access denied'))) { return 'The provided MySQL username doesn\'t have the appropriate permissions to drop tables. Please contact your local system administrator for further assistance.'; } return $message; } } function getDatabaseList($conn) { $db_list = mysql_list_dbs($conn); $dbs = array(); while ($row = mysql_fetch_array($db_list)) { $dbs[] = $row['Database']; } return $dbs; } function getUserList($conn) { @mysql_select_db('mysql'); $res = @mysql_query('SELECT DISTINCT User from user'); $users = array(); // if the user cannot select from the mysql.user table, then return an empty list if (!$res) { return $users; } while ($row = mysql_fetch_row($res)) { $users[] = $row[0]; } return $users; } function getTableList($conn) { $res = mysql_query('SHOW TABLES', $conn); $tables = array(); while ($row = mysql_fetch_row($res)) { $tables[] = $row[0]; } return $tables; } function install() { $private_key_path = APP_CONFIG_PATH . 'private_key.php'; $config_file_path = APP_CONFIG_PATH . 'config.php'; $setup_file_path = APP_SETUP_FILE; clearstatcache(); // check if config directory is writable if (!is_writable(APP_CONFIG_PATH)) { return "The file '" . APP_CONFIG_PATH . "' directory needs to be writable by the web server user. Please correct this problem and try again."; } // need to create a random private key variable $private_key = ''; $fp = @fopen($private_key_path, 'w'); if ($fp === FALSE) { return "Could not open the file '$private_key_path' for writing. The permissions on the file should be set as to allow the user that the web server runs as to open it. Please correct this problem and try again."; } $res = fwrite($fp, $private_key); if ($fp === FALSE) { return "Could not write the configuration information to '$private_key_path'. The file should be writable by the user that the web server runs as. Please correct this problem and try again."; } fclose($fp); // check if we can connect $conn = @mysql_connect($_POST['db_hostname'], $_POST['db_username'], $_POST['db_password']); if (!$conn) { return getErrorMessage('connect', mysql_error()); } $db_list = getDatabaseList($conn); $db_list = array_map('strtolower', $db_list); if (@$_POST['create_db'] == 'yes') { if (!in_array(strtolower($_POST['db_name']), $db_list)) { if (!mysql_query('CREATE DATABASE ' . $_POST['db_name'], $conn)) { return getErrorMessage('create_db', mysql_error()); } } } else { if ((count($db_list) > 0) && (!in_array(strtolower($_POST['db_name']), $db_list))) { return "The provided database name could not be found. Review your information or specify that the database should be created in the form below."; } } // create the new user, if needed if (@$_POST["alternate_user"] == 'yes') { $user_list = getUserList($conn); if (count($user_list) > 0) { $user_list = array_map('strtolower', $user_list); if (@$_POST["create_user"] == 'yes') { if (!in_array(strtolower(@$_POST['eventum_user']), $user_list)) { $stmt = "GRANT SELECT, UPDATE, DELETE, INSERT, ALTER, DROP, CREATE, INDEX ON " . $_POST['db_name'] . ".* TO '" . $_POST["eventum_user"] . "'@'%' IDENTIFIED BY '" . $_POST["eventum_password"] . "'"; if (!mysql_query($stmt, $conn)) { return getErrorMessage('create_user', mysql_error()); } } } else { if (!in_array(strtolower(@$_POST['eventum_user']), $user_list)) { return "The provided MySQL username could not be found. Review your information or specify that the username should be created in the form below."; } } } } // check if we can use the database if (!mysql_select_db($_POST['db_name'])) { return getErrorMessage('select_db', mysql_error()); } // check the CREATE and DROP privileges by trying to create and drop a test table $table_list = getTableList($conn); $table_list = array_map('strtolower', $table_list); if (!in_array('eventum_test', $table_list)) { if (!mysql_query('CREATE TABLE eventum_test (test char(1))', $conn)) { return getErrorMessage('create_test', mysql_error()); } } if (!mysql_query('DROP TABLE eventum_test', $conn)) { return getErrorMessage('drop_test', mysql_error()); } $contents = implode("", file("schema.sql")); $queries = explode(";", $contents); unset($queries[count($queries)-1]); // COMPAT: the next line requires PHP >= 4.0.6 $queries = array_map("trim", $queries); $queries = array_map("replace_table_prefix", $queries); foreach ($queries as $stmt) { if ((stristr($stmt, 'DROP TABLE')) && (@$_POST['drop_tables'] != 'yes')) { continue; } // need to check if a CREATE TABLE on an existing table throws an error if (!mysql_query($stmt, $conn)) { if (stristr($stmt, 'DROP TABLE')) { $type = 'drop_table'; } else { $type = 'create_table'; } return getErrorMessage($type, mysql_error()); } } // substitute the appropriate values in config.php!!! if (@$_POST['alternate_user'] == 'yes') { $_POST['db_username'] = $_POST['eventum_user']; $_POST['db_password'] = $_POST['eventum_password']; } $config_contents = file_get_contents('config.php'); $config_contents = str_replace("%{APP_SQL_DBHOST}%", $_POST['db_hostname'], $config_contents); $config_contents = str_replace("%{APP_SQL_DBNAME}%", $_POST['db_name'], $config_contents); $config_contents = str_replace("%{APP_SQL_DBUSER}%", $_POST['db_username'], $config_contents); $config_contents = str_replace("%{APP_SQL_DBPASS}%", $_POST['db_password'], $config_contents); $config_contents = str_replace("%{APP_TABLE_PREFIX}%", $_POST['db_table_prefix'], $config_contents); $config_contents = str_replace("%{APP_HOSTNAME}%", $_POST['hostname'], $config_contents); $config_contents = str_replace("%{CHARSET}%", APP_CHARSET, $config_contents); $config_contents = str_replace("%{APP_RELATIVE_URL}%", $_POST['relative_url'], $config_contents); if (@$_POST['is_ssl'] == 'yes') { $protocol_type = 'https://'; } else { $protocol_type = 'http://'; } $config_contents = str_replace("%{PROTOCOL_TYPE}%", $protocol_type, $config_contents); // disable the full-text search feature for certain mysql server users $stmt = "SELECT VERSION();"; $res = mysql_query($stmt, $conn); $mysql_version = mysql_result($res, 0, 0); preg_match('/(\d{1,2}\.\d{1,2}\.\d{1,2})/', $mysql_version, $matches); if ($matches[1] > '4.0.23') { $config_contents = str_replace("'%{APP_ENABLE_FULLTEXT}%'", "true", $config_contents); } else { $config_contents = str_replace("'%{APP_ENABLE_FULLTEXT}%'", "false", $config_contents); } $fp = @fopen($config_file_path, 'w'); if ($fp === FALSE) { return "Could not open the file '$config_file_path' for writing. The permissions on the file should be set as to allow the user that the web server runs as to open it. Please correct this problem and try again."; } $res = fwrite($fp, $config_contents); if ($fp === FALSE) { return "Could not write the configuration information to '$config_file_path'. The file should be writable by the user that the web server runs as. Please correct this problem and try again."; } fclose($fp); // write setup file require_once(APP_INC_PATH . "class.setup.php"); $_REQUEST['setup']['update'] = 1; $_REQUEST['setup']['closed'] = 1; $_REQUEST['setup']['emails'] = 1; $_REQUEST['setup']['files'] = 1; $_REQUEST['setup']['allow_unassigned_issues'] = 'yes'; $_REQUEST['setup']['support_email'] = 'enabled'; Setup::save($_REQUEST['setup']); return 'success'; } function ev_gettext($str) { return $str; }