. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 52.223.31.75 / Your IP : 172.31.6.220 [ Web Server : Apache/2.4.66 () OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux ip-172-31-14-81.eu-central-1.compute.internal 4.14.281-212.502.amzn2.x86_64 #1 SMP Thu May 26 09:52:17 UTC 2022 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE Domains : 4 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/sapere/config/ |
Upload File : |
<?php
$nomeFolder = "../";//"sapere/api";
$www = $_SERVER[ 'DOCUMENT_ROOT'];
$root = $www."/".$nomeFolder."/";//substr(getcwd(),0,strrpos(getcwd(),'/'))."/";
ini_set("session.gc_maxlifetime", "14400");
ini_set("session.gc_probability", "1");
ini_set("session.gc_divisor", "100");
//divido le sessioni per dominio di admin
ini_set("session.save_path", $root."./sessions/".$_SERVER['HTTP_HOST']);
ini_set("magic_quotes_gpc", "Off");
ini_set("include_path", ".:".$root."config".":".$root."app".":".$root."app/dependencies".":".$root."app/dependencies/PEAR".":".$root."app/dependencies/zend/ZendGdata/library".":".$root."www".":".$root."www/API".":".$root);
ini_set('memory_limit', '-1');
ini_set('max_execution_time', '-1');
define('SITEROOT_DIR',$root);
//require 'aws/aws-autoloader.php';
/**
*
* Define INI files
*/
$hostname = "https://".$_SERVER['HTTP_HOST'];
if ($_SERVER['HTTP_HOST']=="sapere.formazione-360.it") {
$awsConfig = [
'credentials' => [
'key' => 'AKIASB27JWWY52LXU27B',
'secret' => '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'
],
'region' => 'eu-central-1',
'version' => 'latest',
'bucket' => 'piattaforma-formazione',
'cliente' => "sapere",
'url'=> 'https://s3.eu-central-1.amazonaws.com/piattaforma-formazione/'
];
define('FILE_INI_MDADB','config/mda.ini');
define('FILE_INI_EMAIL','config/email.ini');
}else if ($_SERVER['HTTP_HOST']=="sapere8108.formazione-360.it") {
$awsConfig = [
'credentials' => [
'key' => 'AKIASB27JWWY52LXU27B',
'secret' => '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'
],
'region' => 'eu-central-1',
'version' => 'latest',
'bucket' => 'piattaforma-formazione',
'cliente' => "sapere8108",
'url'=> 'https://s3.eu-central-1.amazonaws.com/piattaforma-formazione/'
];
define('FILE_INI_MDADB','config/mda-8108.ini');
define('FILE_INI_EMAIL','config/email.ini');
}else if ($_SERVER['HTTP_HOST']=="sapere.it-pass.it") {
$awsConfig = [
'credentials' => [
'key' => 'AKIASB27JWWY52LXU27B',
'secret' => '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'
],
'region' => 'eu-central-1',
'version' => 'latest',
'bucket' => 'piattaforma-formazione',
'cliente' => "sapere_it_pass",
'url'=> 'https://s3.eu-central-1.amazonaws.com/piattaforma-formazione/'
];
define('FILE_INI_MDADB','config/mda-itpass.ini');
define('FILE_INI_EMAIL','config/email-itpass.ini');
}else{
//locale
$awsConfig = [
'credentials' => [
'key' => 'AKIASB27JWWY52LXU27B',
'secret' => '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'
],
'region' => 'eu-central-1',
'version' => 'latest',
'bucket' => 'piattaforma-formazione',
'cliente' => "sapere",
'url'=> 'https://s3.eu-central-1.amazonaws.com/piattaforma-formazione/'
];
define('FILE_INI_MDADB','config/mda-local.ini');
define('FILE_INI_EMAIL','config/email-local.ini');
}
define('AWSCONFIG', $awsConfig);
//RICODA CREDENZIALI il .aws nella cwd
define('DEFAULT_IMAGE', $hostname."/".$nomeFolder."/www/img/logo-mini.png");
define('FILE_OPTIONS','config/options.json');
define('API_URL', $hostname."/".$nomeFolder."/www/API/");
define('API_URL_GETFILE', $hostname."/".$nomeFolder."/www/API/?method=getfile&id=");
define('DEFAULT_IMAGE_LDAP', $hostname."/".$nomeFolder."/www/img/logo-mini-ldap.png");
/**
*
* Utilities from legacy - to be removed soon
*/
function forceDeleteSession($id, $nomeFolder = "www"){
return unlink($root."./sessions/".$_SERVER['HTTP_HOST']."sess_".$id);
//return unlink($_SERVER[ 'DOCUMENT_ROOT']."/".$nomeFolder."/sessions/sess_".$id);
}
/* jam framwork */
include_once 'helpers/ocsession.php';
include_once 'helpers/persistant.php';
/**/
?>