ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
+ Collaboration diagram for Debugging:

Functions

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

Variables

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

Detailed Description

Function Documentation

◆ setDebug()

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 ilAuthContainerCAS\initCAS().

465  {
466  global $PHPCAS_DEBUG;
467 
468  if ($filename != FALSE && gettype($filename) != 'string') {
469  phpCAS :: error('type mismatched for parameter $dbg (should be FALSE or the name of the log file)');
470  }
471 
472  if (empty ($filename)) {
473  if (preg_match('/^Win.*/', getenv('OS'))) {
474  if (isset ($_ENV['TMP'])) {
475  $debugDir = $_ENV['TMP'] . '/';
476  } else
477  if (isset ($_ENV['TEMP'])) {
478  $debugDir = $_ENV['TEMP'] . '/';
479  } else {
480  $debugDir = '';
481  }
482  } else {
483  $debugDir = DEFAULT_DEBUG_DIR;
484  }
485  $filename = $debugDir . 'phpCAS.log';
486  }
487 
488  if (empty ($PHPCAS_DEBUG['unique_id'])) {
489  $PHPCAS_DEBUG['unique_id'] = substr(strtoupper(md5(uniqid(''))), 0, 4);
490  }
491 
492  $PHPCAS_DEBUG['filename'] = $filename;
493 
494  phpCAS :: trace('START phpCAS-' . PHPCAS_VERSION . ' ******************');
495  }
error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:544
const DEFAULT_DEBUG_DIR
The default directory for the debug file under Unix.
Definition: CAS.php:260
$filename
Definition: buildRTE.php:89
trace($str)
This method is used to log something in debug mode.
Definition: CAS.php:569
const PHPCAS_VERSION
phpCAS version.
Definition: CAS.php:64
$PHPCAS_DEBUG
This global variable is used to store phpCAS debug mode.
Definition: CAS.php:206
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ DEFAULT_DEBUG_DIR

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().