20111115 a printenv in php - plembo/onemoretech GitHub Wiki

title: A printenv in php link: https://onemoretech.wordpress.com/2011/11/15/a-printenv-in-php/ author: lembobro description: post_id: 1543 created: 2011/11/15 18:16:12 created_gmt: 2011/11/15 22:16:12 comment_status: closed post_name: a-printenv-in-php status: publish post_type: post

A printenv in php

Everyone is familiar with the tried and true printenv.cgi script that comes with the Apache source. Here's a version in php.

 $key_value) {
    print $key_name . " = " . $key_value . "  
";
}

?>

The only thing I don't like about this is the inability to easily disable it. To disable printenv.cgi all you had to do was make it non-executable. For "printenv.php" you'll need to either move it to someplace the web server can't access, or cripple it by, for example, removing the "php" from "<?php".

Copyright 2004-2019 Phil Lembo