I am having problems as well. When adding Security Enforcer to a page it shows:
" Fatal error : Call to a member function restrict() on null in /usr/home/makkumercourant.nl/htdocs/dmxConnectLib/modules/auth.php on line 64
Fatal error : Uncaught exception ‘ErrorException’ with message ‘Cannot modify header information - headers already sent by (output started at /usr/home/makkumercourant.nl/htdocs/dmxConnectLib/modules/auth.php:64)’ in /usr/home/makkumercourant.nl/htdocs/dmxConnectLib/dmxConnect.php:43 Stack trace: #0 [internal function]: exception_error_handler(2, ‘Cannot modify h…’, ‘/usr/home/makku…’, 43, Array) #1 /usr/home/makkumercourant.nl/htdocs/dmxConnectLib/dmxConnect.php(43): header(‘HTTP/1.1 500 In…’) #2 [internal function]: fatal_handler() #3 {main} thrown in /usr/home/makkumercourant.nl/htdocs/dmxConnectLib/dmxConnect.php on line 43"
I checked with other (running) projects and the code is the same (just other dbase)
<?php
require('../dmxConnectLib/dmxConnect.php');
$app = new \lib\App();
$app->exec(<<<'JSON'
{
"steps": [
"Connections/mkmcourant",
"SecurityProviders/sitesecurity",
{
"module": "auth",
"action": "restrict",
"options": {"loginUrl":"index.php","forbiddenUrl":"index.php","provider":"sitesecurity"}
}
]
}
JSON
, TRUE);
?>
When deleting “module”: “auth”, the error will disappear, but so will the security of the page.