config.php 7.85 KB
<?php
/**
 * @file config.php
 * @version $Id: config.php 2368 2014-05-21 08:46:23Z elena $
 */

/*
* Installation-dependent settings
*/

if (!file_exists(__DIR__."/my_config.php")) {
	die("Missing 'my_config.php' config file. Please copy the template file 'php/my_config.template' in 'php/my_config.php' and fill it with your own values.");
}

require_once 'my_config.php';

error_reporting(E_ERROR);

# Load AMDA_Integration config
require_once(INTEGRATION_BASE_PATH.'/config/AMDAIntegrationConfig.php');

//Version
define('AMDA_IHM_VERSION','2.1.0');

//AKKA - For compatibility with IHM
define('BASE_PATH', IHM_SRC_DIR."/");
define('AMDA_IHM', IHM_SRC_DIR."/");

//log for AmdaUpdate/AmdaInstall
define('log', IHM_SRC_DIR.'/LOG');

if (is_file('amda_version.php')) require_once 'amda_version.php';
if (is_file('errors.php')) require_once 'errors.php';

//  SYSTEM config section
if (!defined('PHP_VERSION_ID')) {
	$version = explode('.', PHP_VERSION);
	define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
}
if (!defined('MAGIC_FILE')) define('MAGIC_FILE','/usr/share/misc/magic');

date_default_timezone_set('UTC');

//  GUESTS LOGIN section
define("MaxGuests", 100);               // Max Guests number
define("GuestSessionDuration", 300);   //300 minutes
define("MaxGuestTimeInterval", 10);    // days


// user WS size limit
define('DISK_QUOTA_standard', 1024*1024*200); // 200MB
// max lines of uploaded ascii file to show
define('MAX_FILE_INDEX_TO_SHOW', 100);

// EPN-TAP services
define('EPNTAP_APIS', 'http://voparis-tap-planeto.obspm.fr/__system__/tap/run/sync');
define('EPNTAP_AMDA', 'http://cdpp-epntap.irap.omp.eu/__system__/tap/run/tap/sync');

// PHP run-time settings
ini_set('memory_limit',256000000);
ini_set('max_execution_time',600); // max PHP execution

ini_set('default_socket_timeout', 600); //TODO if this is needed ? IMPEX LONG DURATION WEBSERVICES
// to avoid 403 error while copying from URL
ini_set('user_agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:7.0) Gecko/201001012 Firefox/7.0');
// SHOULD BE DEFINED IN MASTER /etc/php.ini !!!
// ini_set('upload_max_filesize',100000000);
// ini_set('post_max_size',1050000000);

// Delay between two update of remote parameters (in sec.)
define('REMOTE_PARAMS_UPDATE_DELAY', 86400);

// General Info dirs
define('DATAPATH', IHM_SRC_DIR.'/generic_data/');
define('LocalData', DATAPATH.'/LocalData/');
define('PARAMS_LOCALDB_DIR', LocalData.'/ParamDef/');
define('PARAMS_LOCALINFO_DIR', LocalData.'/ParamInfo/');
define('ParamTemplate', LocalData.'/ParamTemplate/');
define('MissionInfo',  LocalData.'/MissionInfo');
define('InstrumentInfo', LocalData.'/InstrumentInfo');
define('DataSetInfo', LocalData.'/DataSetInfo/');
define('RemoteData', DATAPATH.'/RemoteData/');
define('Functions', DATAPATH.'/Functions/');
define('Hst', DATAPATH.'/Hst/');
define('SpecialSettingsDir',DATAPATH.'/SpecialSettings/');
define('CommonLib', DATAPATH.'/compilation/lib/');

// General Info files
define('orbitsXml',LocalData.'/Orbites.xml');
define('orbitsAllXml',LocalData.'/OrbitsAll.xml');
define('FeedbackXml', DATAPATH.'/Feedback/Feedback.xml');
define('specialGrpsXml',SpecialSettingsDir.'/Groups.xml');
define('specialSettingsXml',SpecialSettingsDir.'/Settings.xml');
define('datasetsTimeRestrictionJson',LocalData.'/datasetsTimeRestriction.json');

//Help info dirs
define('HELPPATH', IHM_SRC_DIR."/help/");
define('HelpAuto', HELPPATH.'auto/');

// IMPEX section
define('SimuTargetsXml', DATAPATH.'/SimuTemplate/TargetsSimu.xml');
define('IMPEX_INTERVAL_LIMIT', 86400); // one day for impex request

// Root User dir  : All user dirs are defined in UserMgr.php
define('USERPATH', IHM_SRC_DIR.'/data/');

// Shared dir
define('SHAREDPATH', IHM_SRC_DIR.'/shared_data/');

// Web Service servers WSDL : $_SERVER['SERVER_NAME'] (par apache)  gethostname() (par command)
$SERVER_NAME =  !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : gethostname();
define('webAlias',"http://".$SERVER_NAME.APACHE_ALIAS);

define('DD_WSDL',DDSERVICE.'/dd.wsdl');

putenv("LD_LIBRARY_PATH=".COTS_BASE_DIR."/lib:".GCC_BASE_DIR."/lib:".GCC_BASE_DIR."/lib64:"."/lib:/usr/local/lib:/usr/local/lib64");
putenv("PATH=./:".COTS_BASE_DIR."/bin:".GCC_BASE_DIR."/bin:"."/bin:/usr/bin:/usr/local/bin:".IHM_SRC_DIR."/php/bin");

putenv("DDPATH=".DDRES_DIR);
define('XMLPATH', IHM_SRC_DIR.'/php/XML/');

// HAPI dirs
define('HAPIData', DATAPATH.'/HAPI/');
define('HAPISERVER_PATH', '/opt/tools/hapi-server/');

// EPNTAP dirs
define('EPNTAPData', DATAPATH.'/EPN-TAP/');

require_once(INTEGRATION_BASE_PATH.'/src/amdaintegration_autoload.php');


global $API;
$API = array(
	'AmdaAction'=>array(
		'methods'=>array(
			'getTree'=>array('len'=>1),
			'saveTree'=>array('len'=>1),
			'getInfo'=>array('len'=>1),
			'doNothing'=>array('len'=>1),
			'deleteFromTree'=>array('len'=>1),
			'getObject'=>array('len'=>2),
			'getAsciiFile'=>array('len'=>1),
			'getTmpObject'=>array('len'=>3),
			'getUploadedObject'=>array('len'=>3),
			'getMyParamInfo'=>array('len'=>1),
			'deleteObject'=>array('len'=>1),
			'renameObject'=>array('len'=>1),
			'createObject'=>array('len'=>2),
			'modifyObject'=>array('len'=>1),
			'validNameObject'=>array('len'=>1),
			'getJobs'=>array('len'=>0),
			'execute'=>array('len'=>2),
			//'formHandler'=>true
			'compilParam'=>array('len'=>1),
			'generateParamInfo'=>array('len'=>1),
			'compilParamDelete'=>array('len'=>1),
			'killPlotRequest'=>array('len'=>0),
			'merge'=>array('len'=>1),
			'intersect'=>array('len'=>1),
			'loadTTIntervals'=>array('len'=>1),
			'saveTTCacheIntervalsInTT'=>array('len'=>1),
			'initObjectCache'=>array ('len'=>2),
			'initObjectCacheFromObject'=>array('len'=>2),
			'initObjectCacheFromTmpObject'=>array('len'=>3),
			'initObjectCacheFromUploadedFile'=>array('len'=>3),
			'initObjectCacheFromCatalog'=>array('len'=>2),
			'initObjectCacheFromTimeTable'=>array('len'=>3),
			'readCacheIntervals'=>array('len'=>1),
			'readIntervalsForChart'=>array('len'=>1),
			'addCacheInterval'=>array('len'=>1),
			'removeTTCacheIntervalFromId'=>array('len'=>2),
			'modifyCacheInterval'=>array('len'=>1),
			'operationTTCacheIntervals'=>array('len'=>3),
			'mergeTTCacheIntervals'=>array('len'=>0),
			'getTTCacheStatistics'=>array('len'=>1),
			'sendFeedback'=>array('len'=>1),
			'saveState'=>array('len'=>1),
			'loadState'=>array('len'=>1),
			'getHstImagesUrl'=>array('len'=>1),
			'getAPISImagesUrl'=>array('len'=>1),
			'loadFilterList'=>array('len'=>0),
			'loadFilters'=>array('len'=>1),
			'saveFilter'=>array('len'=>1),
			'createFilter'=>array('len'=>1),
			'destroyFilter'=>array('len'=>1),
			'getCrtFilterId'=>array('len'=>0),
			'getCrtFilterResult'=>array('len'=>0),
			'setCrtFilterId'=>array('len'=>1),
			'resetFilter'=>array('len'=>0),
			'logout'=>array('len'=>1),
			'getUserInfo'=>array('len'=>0),
			'getRun'=>array('len'=>1),
			'addRun'=>array('len'=>1),
			//AKKA - New action to clean user WS
			'cleanUserWS'=>array('len'=>0),
			'deleteSpecialInfo'=>array('len'=>1),
			'interactivePlot'=>array('len'=>1),
			'getParamPlotInit'=>array('len'=>1),
			'getParamInfo'=>array('len'=>1),
			'getDerivedParamInfo'=>array('len'=>1),
			'getMyDataParamInfo'=>array('len'=>1),
			'getSharedObjectFolders' => array('len'=>1),
			'shareObjects' => array('len'=>1),
			'isSharedObjectNameAlreadyUsed' => array('len'=>1),
			'getRequestByProcessId' => array('len'=>1),
			'parseTemplatedParam' => array('len'=>1),
			// Furkan - New Catalog Options
			'deleteColumn' => array('len'=> 1),
			'addColumn' => array('len' => 6),
			'getCatColumnInfo' => array('len' => 1),
			'editColumn' => array('len' => 6),
			// Default Values options
			'getDefaultValueLinks' => array('len' => 0),
			'getDefaultValueTree' => array('len'=>1), 
			'getDefaultValueConfigs' => array('len' => 0),
			'setUserDefaultValues' => array('len' => 1),
			// Parameters list 
			'getParametersList' => array('len' => 0),
            // Reset user password
            'resetPwd' => array('len' => 1),
			
		)
	)
);
?>