PHP does not see environmental variables pertaining to Shib but Perl does
Peter Schober
peter.schober at univie.ac.at
Thu May 31 21:57:08 BST 2012
* Hough, Kenneth P <kenneth.phough at WPI.EDU> [2012-05-31 20:00]:
> I am having trouble with PHP5 trying to access env variables
> pertaining to Shib. I've search the web extensively to find an
> answer but nothing that pertains to our problem.
There's no information here to help you diagnose this.
Is the PHP file in a directory which either requires a shib session or
sees one once it's available? You know this how?
Does httpd (assuming you're using Apache httpd) log the authenticated
username (REMOTE_USER) to the access log for that request?
What does your shib logs say? Turn up debugging for your native.log
(first make sure it exists and can be written to as the webserver, see
the documentation) and check what's there for your request.
> print_r($_server)
I thought that was $_SERVER but since you seem to get something it
seems to work.
Note that for checking an existing Shib session at the SP you don't
need scripting languages or any external tools, just access (default)
/Shibboleth.sso/Session after establishign a session.
> But instead I only see everything else like http_host, script_name
> php_self, etc.... The only resemblance of Shib is in the cookie
> with a unique name.
>
> A CGI script that does the same thing was able to display all the
> information including Shib variables and remote_user.
Then most likely the CGI script is protected by the webserver and your
PHP script is not.
-peter
More information about the users
mailing list