Hi
I want to fetch the SSL_CLIENT_CERT and SSL_SERVER_CERT vars (collected with the SSLOptions +ExportCertData in httpd.conf) with php. Apache's documentation tells us that .......
" This exports two additional environment variables: SSL_CLIENT_CERT and
SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
server (always existing) and the client (only existing when client
authentication is used). This can be used to import the certificates
into CGI scripts."............................

Does php count as a cgi-script when run from shell?
If not, how can i get these vars witout setting up CGI?

I run apache 1.3.20, mod_ssl-2.8.4, openssl-0.9.6a,
php-4.0.6 and Redhat 7.1.
I run php as a static module on apache, but also as a binary in order to use php in shell. Will this cause problems?
Thanx a Million.
Snorre

    CGI - Common Gateway Interface.

    CGI is just a name for some program, no matter what language it's written in, that uses CGI to speak with other programs, typically a web server. So yes PHP can get these variables no matter how it's run.

    You should be able to access those variables using the getenv() function.

    http://www.php.net/manual/en/function.getenv.php

      Nothing turns up when I run phpinfo(), and getenv("SSL_CLIENT_CERT") doesn't get anything.Anyway thanx for the cgi-bit. I'm now a little more out of the dark......
      Snorre

        Write a Reply...