ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Debugging
+ Collaboration diagram for Debugging:

Functions

 phpCAS::setDebug ($filename= '')
 Set/unset debug mode.

Variables

const DEFAULT_DEBUG_DIR = '/tmp/'
 The default directory for the debug file under Unix.

Detailed Description

Function Documentation

phpCAS::setDebug (   $filename = '')

Set/unset debug mode.

Parameters
$filenamethe name of the file used for logging, or FALSE to stop debugging.

Definition at line 465 of file CAS.php.

References $filename, $PHPCAS_DEBUG, DEFAULT_DEBUG_DIR, phpCAS\error(), PHPCAS_VERSION, and phpCAS\trace().

Referenced by ilCASAuth\ilCASAuth(), and ilAuthContainerCAS\initCAS().

{
global $PHPCAS_DEBUG;
if ($filename != FALSE && gettype($filename) != 'string') {
phpCAS :: error('type mismatched for parameter $dbg (should be FALSE or the name of the log file)');
}
if (empty ($filename)) {
if (preg_match('/^Win.*/', getenv('OS'))) {
if (isset ($_ENV['TMP'])) {
$debugDir = $_ENV['TMP'] . '/';
} else
if (isset ($_ENV['TEMP'])) {
$debugDir = $_ENV['TEMP'] . '/';
} else {
$debugDir = '';
}
} else {
$debugDir = DEFAULT_DEBUG_DIR;
}
$filename = $debugDir . 'phpCAS.log';
}
if (empty ($PHPCAS_DEBUG['unique_id'])) {
$PHPCAS_DEBUG['unique_id'] = substr(strtoupper(md5(uniqid(''))), 0, 4);
}
$PHPCAS_DEBUG['filename'] = $filename;
phpCAS :: trace('START phpCAS-' . PHPCAS_VERSION . ' ******************');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

const DEFAULT_DEBUG_DIR = '/tmp/'

The default directory for the debug file under Unix.

Definition at line 260 of file CAS.php.

Referenced by phpCAS\setDebug().