Cannot load CAS 1.6 module
Description
When using php-CAS library 1.6 on a fresh Fusion Directory installation (Fusion Directory 1.4, installed from the sources), I get:
Fatal error: cannot instantiate class 'CAS_Client' - try running 'fusiondirectory-configuration-manager --update-cache' to fix this
The problem seems to be in: include/login/class_LoginCAS.inc
:
/*! \brief Initialize phpCAS library */
static function initCAS ()
{
global $config;
require_once('CAS.php');
/* Move FD autoload after CAS autoload */
spl_autoload_unregister('fusiondirectory_autoload');
spl_autoload_register('fusiondirectory_autoload');
if ($config->get_cfg_value('CasVerbose') == 'TRUE') {
phpCAS::setVerbose(TRUE);
}
The require_once('CAS.php')
fails here with no special log.
However, if I load the library at the beginning of the file html/index.php
, then everythings works fine:
try{
require_once('CAS.php');
} catch(Exception $e){
syslog(LOG_INFO, $e);
}
Distribution Name and Version
- debian 12
FusionDirectory Version
- Fusion-Directory from the sources (1.4-bugfixes)
PHP version used
- php 7.4
- php-cas: version 1.6.0-1 (from official debian repository)
Origin of php packages
- official dependencies from debian
- https://packages.sury.org/php/ for php 7.4 version
Steps to Reproduce
- Configure CAS in Fusion Directory: Login = CAS, Host, Port, Context
- tick "Verbose error" and "library CAS 1.6"
- try to connect on Fusion Directory
Expected behavior:
login
Actual behavior:
error displayed in description
Reproduces how often:
100%