[go: up one dir, main page]

Menu

[r1105]: / trunk / phpsettings.php  Maximize  Restore  History

Download this file

45 lines (36 with data), 1.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/* This file is part of testMaker.
testMaker is free software; you can redistribute it and/or modify
it under the terms of version 2 of the GNU General Public License as
published by the Free Software Foundation.
testMaker is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
/**
* Checks and sets PHP settings
*
* Change the php options to meet your needs, respectively the capabilities of your server
* @package Core
*/
ini_set("display_errors", TRUE);
// Configuration of error reporting
if (defined('E_DEPRECATED'))
ini_set("error_reporting", E_ALL & ~E_NOTICE & ~E_DEPRECATED);
else
ini_set("error_reporting", E_ALL & ~E_NOTICE);
// Configuration of error reporting (debug mode)
if ($GLOBALS["is_dev_machine"]) {
ini_set("display_errors", TRUE);
ini_set("error_reporting", E_ALL);
}
ini_set("magic_quotes_runtime", FALSE);
// Deal with cookie path
$urlPath = $_SERVER['SCRIPT_NAME'];
$urlPath = substr($urlPath, 0, strrpos($urlPath, '/'));
if (!$urlPath) $urlPath = '/';
ini_set('session.cookie_path', $urlPath);
ini_set('session.use_only_cookies', TRUE);
?>