What SSL $_SERVER variables are available in PHP

I found myself wondering what HTTPS variables were available in the $_SERVER variable today and didn’t find a specific list (and didn’t have mod_ssl installed). ┬áSo as a public service, here is what my server says.

array(58) {
["HTTPS"]=>
string(2) “on”
["SSL_VERSION_INTERFACE"]=>
string(13) “mod_ssl/2.2.3″
["SSL_VERSION_LIBRARY"]=>
string(25) “OpenSSL/0.9.8e-fips-rhel5″
["SSL_PROTOCOL"]=>
string(5) “TLSv1″
["SSL_SECURE_RENEG"]=>
string(4) “true”
["SSL_COMPRESS_METHOD"]=>
string(4) “NULL”
["SSL_CIPHER"]=>
string(18) “DHE-RSA-AES256-SHA”
["SSL_CIPHER_EXPORT"]=>
string(5) “false”
["SSL_CIPHER_USEKEYSIZE"]=>
string(3) “256”
["SSL_CIPHER_ALGKEYSIZE"]=>
string(3) “256”
["SSL_CLIENT_VERIFY"]=>
string(4) “NONE”
["SSL_SERVER_M_VERSION"]=>
string(1) “3”
["SSL_SERVER_M_SERIAL"]=>
string(4) “6B5B”
["SSL_SERVER_V_START"]=>
string(24) “Aug 30 13:53:57 2013 GMT”
["SSL_SERVER_V_END"]=>
string(24) “Aug 30 13:53:57 2014 GMT”
["SSL_SERVER_S_DN"]=>
string(139) “/C=–/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=localhost.localdomain/emailAddress=[email protected]
["SSL_SERVER_S_DN_C"]=>
string(2) “–”
["SSL_SERVER_S_DN_ST"]=>
string(9) “SomeState”
["SSL_SERVER_S_DN_L"]=>
string(8) “SomeCity”
["SSL_SERVER_S_DN_O"]=>
string(16) “SomeOrganization”
["SSL_SERVER_S_DN_OU"]=>
string(22) “SomeOrganizationalUnit”
["SSL_SERVER_S_DN_CN"]=>
string(21) “localhost.localdomain”
["SSL_SERVER_S_DN_Email"]=>
string(26) “[email protected]
["SSL_SERVER_I_DN"]=>
string(139) “/C=–/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=localhost.localdomain/emailAddress=[email protected]

["SSL_SERVER_I_DN_C"]=>
string(2) “–”
["SSL_SERVER_I_DN_ST"]=>
string(9) “SomeState”
["SSL_SERVER_I_DN_L"]=>
string(8) “SomeCity”
["SSL_SERVER_I_DN_O"]=>
string(16) “SomeOrganization”
["SSL_SERVER_I_DN_OU"]=>
string(22) “SomeOrganizationalUnit”
["SSL_SERVER_I_DN_CN"]=>
string(21) “localhost.localdomain”
["SSL_SERVER_I_DN_Email"]=>
string(26) “[email protected]
["SSL_SERVER_A_KEY"]=>
string(13) “rsaEncryption”
["SSL_SERVER_A_SIG"]=>
string(21) “sha1WithRSAEncryption”
["SSL_SESSION_ID"]=>
string(64) “BE411F57BA97B3C7D61FC07B0DA965B99BF448081CA8C936C2BDE0C320712F3E”
["HTTP_TE"]=>
string(18) “deflate,gzip;q=0.3″
["HTTP_CONNECTION"]=>
string(9) “TE, close”
["HTTP_HOST"]=>
string(9) “localhost”
["HTTP_USER_AGENT"]=>
string(16) “lwp-request/2.07″
["PATH"]=>
string(29) “/sbin:/usr/sbin:/bin:/usr/bin”
["SERVER_SIGNATURE"]=>
string(70) “<address>Apache/2.2.3 (CentOS) Server at localhost Port 443</address>

["SERVER_SOFTWARE"]=>
string(21) “Apache/2.2.3 (CentOS)”
["SERVER_NAME"]=>
string(9) “localhost”
["SERVER_ADDR"]=>
string(9) “127.0.0.1”
["SERVER_PORT"]=>
string(3) “443”
["REMOTE_ADDR"]=>
string(9) “127.0.0.1”
["DOCUMENT_ROOT"]=>
string(13) “/var/www/html”
["SERVER_ADMIN"]=>
string(14) “root@localhost”
["SCRIPT_FILENAME"]=>
string(23) “/var/www/html/index.php”
["REMOTE_PORT"]=>
string(5) “41195”
["GATEWAY_INTERFACE"]=>
string(7) “CGI/1.1″
["SERVER_PROTOCOL"]=>
string(8) “HTTP/1.1″
["REQUEST_METHOD"]=>
string(3) “GET”

["QUERY_STRING"]=>
string(0) “”
["REQUEST_URI"]=>
string(1) “/”
["SCRIPT_NAME"]=>
string(10) “/index.php”
["PHP_SELF"]=>
string(10) “/index.php”
["REQUEST_TIME_FLOAT"]=>
float(1377871511.902)
["REQUEST_TIME"]=>
int(1377871511)
}

0 comments

Post Navigation

Web Analytics