ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
server.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
24const ILIAS_MODULE = 'components/ILIAS/soap';
25
26chdir('../..');
27
28require_once 'vendor/composer/vendor/autoload.php';
29require_once __DIR__ . '/../../artifacts/bootstrap_default.php';
30entry_point('ILIAS Legacy Initialisation Adapter');
31
32// Initialize the error_reporting level, until it will be overwritte when ILIAS gets initialized
33error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
34
36
37$ilIliasIniFile = new ilIniFile('./ilias.ini.php');
38$ilIliasIniFile->read();
39
40if ($ilIliasIniFile->readVariable('https', 'auto_https_detect_enabled')) {
41 $headerName = $ilIliasIniFile->readVariable('https', 'auto_https_detect_header_name');
42 $headerValue = $ilIliasIniFile->readVariable('https', 'auto_https_detect_header_value');
43
44 $headerName = 'HTTP_' . str_replace('-', '_', strtoupper($headerName));
45 if (strcasecmp($_SERVER[$headerName], $headerValue) === 0) {
46 $_SERVER['HTTPS'] = 'on';
47 }
48}
49
50if (strcasecmp($_SERVER['REQUEST_METHOD'], 'post') === 0) {
51 // This is a SOAP request
52 require_once './components/ILIAS/soap/include/inc.soap_functions.php';
53 $uri = ilSoapFunctions::buildHTTPPath(false) . '/server.php';
54 if (isset($_GET['client_id'])) {
55 $uri .= '?client_id=' . $_GET['client_id'];
56 $wsdl = $uri . '&wsdl';
57 } else {
58 $wsdl = $uri . '?wsdl';
59 }
60
61 $soapServer = new SoapServer($wsdl, ['uri' => $uri]);
62 $soapServer->setObject(new ilSoapFunctions());
63 $soapServer->handle();
64} else {
65 // This is a request to display the available SOAP methods or WSDL...
67 require './components/ILIAS/soap/nusoapserver.php';
68}
static init(string $a_type)
Init context by type.
const CONTEXT_SOAP
INIFile Parser Early access in init proceess! Avoid further dependencies like logging or other servic...
static initILIAS()
ilias initialisation
static buildHTTPPath(bool $use_module_depending_path=true)
$_GET['cmd']
Definition: lti.php:26
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26
entry_point(string $name)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: result1.php:21
const ILIAS_MODULE
Definition: server.php:24
const IL_SOAPMODE
Definition: server.php:23
$ilIliasIniFile
Definition: server.php:37
const IL_SOAPMODE_INTERNAL
Definition: server.php:22
const IL_SOAPMODE_NUSOAP
Definition: server.php:21