diff --git a/.gitignore b/.gitignore index 2554c11..ab897fd 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ js/lib/ext help/simu help/auto php/bin +php/my_config.php *~ logs/* php/log diff --git a/php/config.php b/php/config.php index a3c030b..2b46d6a 100644 --- a/php/config.php +++ b/php/config.php @@ -7,16 +7,21 @@ /* * 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'); +require_once(INTEGRATION_BASE_PATH.'/config/AMDAIntegrationConfig.php'); //AKKA - For compatibility with IHM -define('BASE_PATH', IHM_SRC_DIR); -define('AMDA_IHM', IHM_SRC_DIR); +define('BASE_PATH', IHM_SRC_DIR."/"); +define('AMDA_IHM', IHM_SRC_DIR."/"); //log for AmdaUpdate/AmdaInstall define('log', IHM_SRC_DIR.'/LOG'); @@ -68,51 +73,51 @@ ini_set('user_agent', 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:7.0) Gecko/201 // General Info dirs -define('DATAPATH', IHM_SRC_DIR.'generic_data/'); +define('DATAPATH', IHM_SRC_DIR.'/generic_data/'); //define('Param', DATAPATH.'Param/'); -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('HelpAuto', DATAPATH.'help/auto/'); +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('HelpAuto', DATAPATH.'/help/auto/'); //define('Plot', DATAPATH.'Plot/'); -define('Hst', DATAPATH.'Hst/'); -define('SpecialSettingsDir',DATAPATH.'SpecialSettings/'); +define('Hst', DATAPATH.'/Hst/'); +define('SpecialSettingsDir',DATAPATH.'/SpecialSettings/'); // 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('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'); //Help info dirs -define('HELPPATH', IHM_SRC_DIR."help/"); +define('HELPPATH', IHM_SRC_DIR."/help/"); // IMPEX section -define('SimuTargetsXml', DATAPATH.'SimuTemplate/TargetsSimu.xml'); +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/'); +define('USERPATH', IHM_SRC_DIR.'/data/'); // Shared dir -define('SHAREDPATH', IHM_SRC_DIR.'shared_data/'); +define('SHAREDPATH', IHM_SRC_DIR.'/shared_data/'); // WEB SERVICES section -define('WSRESULT', USERPATH.'WSRESULT/'); // Web Services result directory -define('wsResultsXml',WSRESULT.'WSresults.xml'); // Web Service result file -define('plotsXml', IHM_SRC_DIR.'public/WebServices/XML/AmdaPlots.xml'); // Web Service getPlot : list of parameters to plot +define('WSRESULT', USERPATH.'/WSRESULT/'); // Web Services result directory +define('wsResultsXml',WSRESULT.'/WSresults.xml'); // Web Service result file +define('plotsXml', IHM_SRC_DIR.'/public/WebServices/XML/AmdaPlots.xml'); // Web Service getPlot : list of parameters to plot // Web Service servers WSDL : $_SERVER['SERVER_NAME'] (par apache) gethostname() (par command) $SERVER_NAME = $_SERVER['SERVER_NAME'] ? $_SERVER['SERVER_NAME'] : gethostname(); define('webAlias',"http://".$SERVER_NAME.APACHE_ALIAS); -define('wsdl_AMDA', webAlias."public/wsdl/Methods_AMDA.wsdl"); +define('wsdl_AMDA', webAlias."/public/wsdl/Methods_AMDA.wsdl"); define('DD_WSDL',DDSERVICE.'/dd.wsdl'); @@ -120,9 +125,9 @@ putenv("LD_LIBRARY_PATH=".COTS_BASE_DIR."/lib:".GCC_BASE_DIR."/lib:".GCC_BASE_DI 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/'); +define('XMLPATH', IHM_SRC_DIR.'/php/XML/'); -require_once(INTEGRATION_BASE_PATH.'src/amdaintegration_autoload.php'); +require_once(INTEGRATION_BASE_PATH.'/src/amdaintegration_autoload.php'); global $API; $API = array( diff --git a/php/my_config.php b/php/my_config.php deleted file mode 100644 index ea2621d..0000000 --- a/php/my_config.php +++ /dev/null @@ -1,34 +0,0 @@ - diff --git a/php/my_config.template.php b/php/my_config.template.php new file mode 100644 index 0000000..a36e04b --- /dev/null +++ b/php/my_config.template.php @@ -0,0 +1,35 @@ + -- libgit2 0.21.2