Get $_SERVER variable


#1

Hi,

I want to protect my cake application with shibboleth. Therefore I configured a location “/user/login” in the Apache with AuthType shibboleth. This works if I call a simple test.php behind this location with

echo $_SERVER[‘HTTP_LIBRARY_ID’];

which shows me the content of $_SERVER[‘HTTP_LIBRARY_ID’] after the login via Shibboleth.

My problem is:
How can I get $_SERVER[‘HTTP_LIBRARY_ID’] inside my controller method in Cakephp?
Instead of the content I get “Undefined index: HTTP_SHIB_APPLICATION_ID”, no matter where I place the code.

Any idea?


#2

I don’t see why accessing $_SERVER['HTTP_LIBRARY_ID'] could ever give you "Undefined index: HTTP_SHIB_APPLICATION_ID” as an error message. Are you perhaps referencing HTTP_SHIB_APPLICATION_ID elsewhere?


#3

No. As far as I know I can access the $_SERVER variable anywhere in my Controllers/methods, but I don’t.


#4

My fault, a space at the wrong place. It works now.