On many servers, PHP runs as CGI. This is an essential part of using suexec to run the scripts for each site as the user associated with the site. So giving up CGI is not appealing.
But as I understand it the various values such as $_SERVER['SSL_CLIENT_S_DN_CN'] are not set when PHP runs as CGI. This is a pity, as it would be good to have some logic that depended on the presentation of a certificate.
Within a PHP script (PHP as CGI) is there any way to access information about the certificate presented by the user through their browser?