Blame view

php/config.php 7.19 KB
16035364   Benjamin Renard   First commit
1
<?php
a394ee09   Nathanael Jourdane   bugFix token
2
/**
16035364   Benjamin Renard   First commit
3
4
 * @file config.php
 * @version $Id: config.php 2368 2014-05-21 08:46:23Z elena $
16035364   Benjamin Renard   First commit
5
 */
10200969   Roipoussiere   Remove whitespace...
6

bf74fc2d   Elena.Budnik   IMPEX
7
/*
bf74fc2d   Elena.Budnik   IMPEX
8
9
* Installation-dependent settings
*/
72cddaa0   Benjamin Renard   Add template for ...
10
11
12
13
14

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.");
}

16035364   Benjamin Renard   First commit
15
16
require_once 'my_config.php';

cbcca5af   Benjamin Renard   Restore error_rep...
17
error_reporting(E_ERROR);
10200969   Roipoussiere   Remove whitespace...
18

a22ecd3b   Benjamin Renard   Keep only necessa...
19
# Load AMDA_Integration config
72cddaa0   Benjamin Renard   Add template for ...
20
require_once(INTEGRATION_BASE_PATH.'/config/AMDAIntegrationConfig.php');
a22ecd3b   Benjamin Renard   Keep only necessa...
21
22

//AKKA - For compatibility with IHM
72cddaa0   Benjamin Renard   Add template for ...
23
24
define('BASE_PATH', IHM_SRC_DIR."/");
define('AMDA_IHM', IHM_SRC_DIR."/");
a22ecd3b   Benjamin Renard   Keep only necessa...
25
26

//log for AmdaUpdate/AmdaInstall
75492fe8   Benjamin Renard   Remove some obsol...
27
define('log', IHM_SRC_DIR.'/LOG');
a22ecd3b   Benjamin Renard   Keep only necessa...
28

9e3cbd95   Elena.Budnik   merge AMDA_IHM AM...
29
30
if (is_file('amda_version.php')) require_once 'amda_version.php';
if (is_file('errors.php')) require_once 'errors.php';
10200969   Roipoussiere   Remove whitespace...
31

0fea5567   Benjamin Renard   First step for re...
32
//  SYSTEM config section
9e3cbd95   Elena.Budnik   merge AMDA_IHM AM...
33
if (!defined('PHP_VERSION_ID')) {
bf74fc2d   Elena.Budnik   IMPEX
34
35
	$version = explode('.', PHP_VERSION);
	define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
16035364   Benjamin Renard   First commit
36
}
9e3cbd95   Elena.Budnik   merge AMDA_IHM AM...
37
if (!defined('MAGIC_FILE')) define('MAGIC_FILE','/usr/share/misc/magic');
10200969   Roipoussiere   Remove whitespace...
38

10200969   Roipoussiere   Remove whitespace...
39
date_default_timezone_set('UTC');
16035364   Benjamin Renard   First commit
40

9e3cbd95   Elena.Budnik   merge AMDA_IHM AM...
41
//  GUESTS LOGIN section
1c86e68e   Myriam Bouchemit   Max Guests number...
42
define("MaxGuests", 15);               // Max Guests number
16035364   Benjamin Renard   First commit
43
define("GuestSessionDuration", 300);   //300 minutes
9e3cbd95   Elena.Budnik   merge AMDA_IHM AM...
44
45
define("MaxGuestTimeInterval", 10);    // days

16035364   Benjamin Renard   First commit
46

16035364   Benjamin Renard   First commit
47
// user WS size limit
7baca0ef   Elena.Budnik   user special sett...
48
define('DISK_QUOTA_standard', 1024*1024*200); // 200MB
10200969   Roipoussiere   Remove whitespace...
49
// max lines of uploaded ascii file to show
bf74fc2d   Elena.Budnik   IMPEX
50
define('MAX_FILE_INDEX_TO_SHOW', 100);
6acb8d2a   Elena.Budnik   checkRequest in R...
51

16035364   Benjamin Renard   First commit
52
// EPN-TAP services
a394ee09   Nathanael Jourdane   bugFix token
53
54
define('EPNTAP_APIS', 'http://voparis-tap.obspm.fr/__system__/tap/run/tap/sync');
define('EPNTAP_AMDA', 'http://cdpp-epntap.irap.omp.eu/__system__/tap/run/tap/sync');
16035364   Benjamin Renard   First commit
55

0fea5567   Benjamin Renard   First step for re...
56
// PHP run-time settings
378a5f7d   Benjamin Renard   Increase PHP memo...
57
ini_set('memory_limit',256000000);
bf74fc2d   Elena.Budnik   IMPEX
58
ini_set('max_execution_time',600); // max PHP execution
38ee7afc   Elena.Budnik   correction of mer...
59

bf74fc2d   Elena.Budnik   IMPEX
60
61
62
63
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 !!!
10200969   Roipoussiere   Remove whitespace...
64
// ini_set('upload_max_filesize',100000000);
bf74fc2d   Elena.Budnik   IMPEX
65
// ini_set('post_max_size',1050000000);
7baca0ef   Elena.Budnik   user special sett...
66

aa2786b4   Benjamin Renard   Opimization aroun...
67
// Delay between two update of remote parameters (in sec.)
f3785796   Myriam Bouchemit   REMOTE_PARAMS_UPD...
68
define('REMOTE_PARAMS_UPDATE_DELAY', 86400);
16035364   Benjamin Renard   First commit
69

bf74fc2d   Elena.Budnik   IMPEX
70
// General Info dirs
72cddaa0   Benjamin Renard   Add template for ...
71
define('DATAPATH', IHM_SRC_DIR.'/generic_data/');
72cddaa0   Benjamin Renard   Add template for ...
72
73
74
75
76
77
78
79
80
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/');
72cddaa0   Benjamin Renard   Add template for ...
81
82
define('Hst', DATAPATH.'/Hst/');
define('SpecialSettingsDir',DATAPATH.'/SpecialSettings/');
fc890e33   Benjamin Renard   Define common lib...
83
define('CommonLib', DATAPATH.'/compilation/lib/');
16035364   Benjamin Renard   First commit
84

bf74fc2d   Elena.Budnik   IMPEX
85
// General Info files
72cddaa0   Benjamin Renard   Add template for ...
86
87
88
89
90
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');
3afe4f59   Benjamin Renard   Add datasets time...
91
define('datasetsTimeRestrictionJson',LocalData.'/datasetsTimeRestriction.json');
16035364   Benjamin Renard   First commit
92
93

//Help info dirs
72cddaa0   Benjamin Renard   Add template for ...
94
define('HELPPATH', IHM_SRC_DIR."/help/");
82d5e2cf   Elena.Budnik   auto in help dir
95
define('HelpAuto', HELPPATH.'auto/');
16035364   Benjamin Renard   First commit
96

9e3cbd95   Elena.Budnik   merge AMDA_IHM AM...
97
// IMPEX section
72cddaa0   Benjamin Renard   Add template for ...
98
define('SimuTargetsXml', DATAPATH.'/SimuTemplate/TargetsSimu.xml');
9e3cbd95   Elena.Budnik   merge AMDA_IHM AM...
99
define('IMPEX_INTERVAL_LIMIT', 86400); // one day for impex request
16035364   Benjamin Renard   First commit
100

bf74fc2d   Elena.Budnik   IMPEX
101
// Root User dir  : All user dirs are defined in UserMgr.php
72cddaa0   Benjamin Renard   Add template for ...
102
define('USERPATH', IHM_SRC_DIR.'/data/');
16035364   Benjamin Renard   First commit
103

bf74fc2d   Elena.Budnik   IMPEX
104
// Shared dir
72cddaa0   Benjamin Renard   Add template for ...
105
define('SHAREDPATH', IHM_SRC_DIR.'/shared_data/');
16035364   Benjamin Renard   First commit
106

10200969   Roipoussiere   Remove whitespace...
107
// Web Service servers WSDL : $_SERVER['SERVER_NAME'] (par apache)  gethostname() (par command)
0c8a11ef   Benjamin Renard   Tests suits for W...
108
$SERVER_NAME =  !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : gethostname();
63f83396   Elena.Budnik   orbit in km for i...
109
define('webAlias',"http://".$SERVER_NAME.APACHE_ALIAS);
bf74fc2d   Elena.Budnik   IMPEX
110

b7741da9   Benjamin Renard   Define DDService ...
111
112
define('DD_WSDL',DDSERVICE.'/dd.wsdl');

99ae8744   Benjamin Renard   Use config variab...
113
114
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");
16035364   Benjamin Renard   First commit
115

16035364   Benjamin Renard   First commit
116
putenv("DDPATH=".DDRES_DIR);
72cddaa0   Benjamin Renard   Add template for ...
117
define('XMLPATH', IHM_SRC_DIR.'/php/XML/');
bf74fc2d   Elena.Budnik   IMPEX
118

fa544567   Benjamin Renard   First implementat...
119
120
121
122
// HAPI dirs
define('HAPIData', DATAPATH.'/HAPI/');
define('HAPISERVER_PATH', '/opt/tools/hapi-server/');

72cddaa0   Benjamin Renard   Add template for ...
123
require_once(INTEGRATION_BASE_PATH.'/src/amdaintegration_autoload.php');
16035364   Benjamin Renard   First commit
124

16035364   Benjamin Renard   First commit
125

10200969   Roipoussiere   Remove whitespace...
126
global $API;
16035364   Benjamin Renard   First commit
127
$API = array(
bf74fc2d   Elena.Budnik   IMPEX
128
129
130
131
132
133
134
	'AmdaAction'=>array(
		'methods'=>array(
			'getTree'=>array('len'=>1),
			'saveTree'=>array('len'=>1),
			'getInfo'=>array('len'=>1),
			'doNothing'=>array('len'=>1),
			'deleteFromTree'=>array('len'=>1),
10200969   Roipoussiere   Remove whitespace...
135
			'getObject'=>array('len'=>2),
bf74fc2d   Elena.Budnik   IMPEX
136
137
138
139
			'getAsciiFile'=>array('len'=>1),
			'getTmpObject'=>array('len'=>3),
			'getUploadedObject'=>array('len'=>3),
			'getMyParamInfo'=>array('len'=>1),
10200969   Roipoussiere   Remove whitespace...
140
			'deleteObject'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
141
142
143
144
145
146
147
148
			'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),
8ba47f72   Benjamin Renard   rest actualisatio...
149
			'generateParamInfo'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
150
151
152
153
			'compilParamDelete'=>array('len'=>1),
			'killPlotRequest'=>array('len'=>0),
			'merge'=>array('len'=>1),
			'intersect'=>array('len'=>1),
10200969   Roipoussiere   Remove whitespace...
154
			'loadTTIntervals'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
155
			'saveTTCacheIntervalsInTT'=>array('len'=>1),
0fea5567   Benjamin Renard   First step for re...
156
			'initObjectCache'=>array ('len'=>2),
342b20ca   Benjamin Renard   Fix inheritence b...
157
			'initObjectCacheFromObject'=>array('len'=>2),
0fea5567   Benjamin Renard   First step for re...
158
159
160
			'initObjectCacheFromTmpObject'=>array('len'=>3),
			'initObjectCacheFromUploadedFile'=>array('len'=>3),
			'initObjectCacheFromCatalog'=>array('len'=>2),
19eca0a6   Hacene SI HADJ MOHAND   ok
161
			'initObjectCacheFromTimeTable'=>array('len'=>3),
342b20ca   Benjamin Renard   Fix inheritence b...
162
			'readCacheIntervals'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
163
			'readIntervalsForChart'=>array('len'=>1),
342b20ca   Benjamin Renard   Fix inheritence b...
164
			'addCacheInterval'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
165
			'removeTTCacheIntervalFromId'=>array('len'=>2),
342b20ca   Benjamin Renard   Fix inheritence b...
166
			'modifyCacheInterval'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
167
168
			'operationTTCacheIntervals'=>array('len'=>2),
			'mergeTTCacheIntervals'=>array('len'=>0),
0318dbe6   Hacene SI HADJ MOHAND   rm_6998 ok
169
			'getTTCacheStatistics'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
170
171
172
			'sendFeedback'=>array('len'=>1),
			'saveState'=>array('len'=>1),
			'loadState'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
173
174
175
176
177
178
179
180
181
182
183
184
185
			'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),
bf74fc2d   Elena.Budnik   IMPEX
186
187
188
189
190
			'getRun'=>array('len'=>1),
			'addRun'=>array('len'=>1),
			//AKKA - New action to clean user WS
			'cleanUserWS'=>array('len'=>0),
			'deleteSpecialInfo'=>array('len'=>1),
b39c9d1d   Benjamin Renard   Fix interactive n...
191
			'interactivePlot'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
192
193
			'getParamPlotInit'=>array('len'=>1),
			'getParamInfo'=>array('len'=>1),
bf776dc8   Benjamin Renard   working
194
			'getDerivedParamInfo'=>array('len'=>1),
22d8d756   Hacene SI HADJ MOHAND   resolu
195
			'getMyDataParamInfo'=>array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
196
197
			'getSharedObjectFolders' => array('len'=>1),
			'shareObjects' => array('len'=>1),
0bda97f3   Benjamin Renard   Fix SAMP export f...
198
199
			'isSharedObjectNameAlreadyUsed' => array('len'=>1),
			'getRequestByProcessId' => array('len'=>1),
a82e0206   Benjamin Renard   Commit missing mo...
200
			'parseTemplatedParam' => array('len'=>1),
bf74fc2d   Elena.Budnik   IMPEX
201
		)
10200969   Roipoussiere   Remove whitespace...
202
	)
16035364   Benjamin Renard   First commit
203
204
);
?>