Finally, i have installed the script in the root of www.tabulame.net, but i got an error:
Notice: Constant _APP_MAIN_DIR already defined in /home/lcwdkyxa/public_html/config.php on line 54
My config.php is:
<?php
/**
* jobber job board platform
*
* @author Filip C.T.E. <http://www.filipcte.ro> <me@filipcte.ro>
* @license You are free to edit and use this work, but it would be nice if you always referenced the original author
* (see license.txt).
*/
header('Content-Type: text/html; charset=UTF-8');
ini_set('display_errors', 'On');
error_reporting(E_ALL ^ E_STRICT);
date_default_timezone_set('Europe/Bucharest');
// MySQL + misc settings for local environment
if ($_SERVER['SERVER_NAME'] == 'localhost')
{
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'jobberbase');
define('LOCATION', 'local');
define('ENVIRONMENT', 'dev');
}
// MySQL + misc settings for production environment
else
{
define('DB_HOST', 'localhost');
define('DB_USER', 'lcwdkyxa_xxxx');
define('DB_PASS', 'xxxxxx');
define('DB_NAME', 'lcwdkyxa_xxxx);
define('LOCATION', 'online');
define('JOBBER_URL', 'http://www.tabulame.net/');
define('_APP_MAIN_DIR', '');
define('ENVIRONMENT', 'prod');
}
// Global settings definitions
define('NOTIFY_EMAIL','info@tabulame.net');
define('ADMIN_EMAIL','info@tabulame.net');
define('SITE_NAME', 'Tabulame.net');
define('MAX_CV_SIZE', 3000000); // approx. 3 mb
define('FILE_UPLOAD_DIR', 'uploads/');
define('JOBS_PER_PAGE', 50);
//define ('APP_PATH', $_SERVER['DOCUMENT_ROOT'] . _APP_MAIN_DIR . '/');
define('APP_PATH',dirname(__FILE__).'/');
if(isset($_SERVER['SCRIPT_NAME']))
{
define('_APP_MAIN_DIR', rtrim(dirname($_SERVER['SCRIPT_NAME']),'/'));
}
else
{
//define('_APP_MAIN_DIR','/jobberbase/app');
die('[config.php] Cannot determine APP_MAIN_DIR, please set manual and comment this line');
}
if(isset($_SERVER['HTTP_HOST']) && isset($_SERVER['SERVER_PORT']))
{
if($_SERVER['SERVER_PORT'] == 80)
{
define ('BASE_URL', 'http://' . $_SERVER['HTTP_HOST'] . _APP_MAIN_DIR . '/');
}
else
{
define ('BASE_URL', 'http://' . $_SERVER['HTTP_HOST'].':'.$_SERVER['SERVER_PORT'] . _APP_MAIN_DIR . '/');
}
}
else
{
//define ('BASE_URL', 'http://jobberbase.ro' . _APP_MAIN_DIR . '/');
die('[config.php] Cannot determine BASE_URL, please set manual and comment this line');
}
...
What is the problem?
Thanks in advance!