Only a year and a half after the original question was posed(!), but I do have some things to add to this thread having tried the same thing myself (and having discovered the posting through google).
I too am using apache, mod_ssl, and php and wanted to discover the Distinguished Name in the client certificate presented in the SSL handshake.
I found an important step was to go into the /usr/apache/conf/httpd.conf file and (as well as the usual changes required to enable client certification) scroll down to the SSL Engine Options section and type 'SSLOptions +StdEnvVars'. As the config file states, "This exports the standard SSL/TLS related SSL_* environment variables..."
If you then, in your php script do a php_info() you will see in the list of server variables a whole host of them relating to SSL, including ones that extract the client Distinguished Name. e.g. $SSL_CLIENT_S_DN_CN (for the Common Name).
Hope this proves useful to someone doing the same thing in 2002+!
Graham