I am checking for the availability of Cookie variables via echo in the browser called script like so
var_dump($_COOKIE);
and via frwite in the Apache RewriteMap since it can't echo to anything, like so
fwrite($fh, var_export($_COOKIE, true));
also note that the session value of interest is passed to the script from apache like so
RewriteCond %{HTTP_COOKIE} \bsid=[0-9a-z]{32}\b
RewriteRule ^ - [E=SID:%1]
RewriteCond ${prg:%{ENV:SID}} =true
The browser called script shows the correct cookie entries/values, but the RewriteMap script shows an empty cookie. I wonder if this is because RewriteMap requires its scripts to enter an infinite loop waiting for standard in. Alternatively, could it have anything to do that the browser script is using suPHP while Apache might be calling just plain old PHP. I am still debuging and it might be the case that I made a mistake somewhere, but I wanted to know if this was something different entirely.