Bypassing the "C:XDIA values" solution (filing that under "Useless Smartarse Diatribe (USD)")
What I wound up doing was versioning the code so that I figured that only machines that populated STDIN with a value along with the apparent behavior of PHP inasmuch as version 4.3.3+ was ok with STDIN and anything less than that was not:
function &getResponse() {
/*----------------------------------------------------------------------------------------------
New 8/12/2005: If constant STDIN exists, a constant data-input stream exists and there is no
need to open an input stream. Retrieve from there and return. Only available in PHP 4.3.3+
to PHP 5+ and if STDIN consists of a valid constant input stream
-----------------------------------------------------------------------------------------------*/
$version = trim(substr(preg_replace('/[\n\r]+/', ' ', shell_exec('php -v')), 3, 6));
if ((preg_match('/^4\.3\.[3-9]+/', $version) || preg_match('/^4\.[4-9]\.[0-9]+/', $version) || preg_match('/^5\.[0-9]/', $version)) &&
is_resource(STDIN)
) {
$response = trim(@fgets(STDIN, 256));
return $response;
}
/*----------------------------------------------------------------------------------------------
New 7/29/2005: Windows can use STDIN, however, the 'con' input data stream, i.e. 'console',
is built into DOS functionality and produces a better data input stream result. Use that
for Windows. If this stream is not available or if you are using UNIX, you will simply
open using STDIN by default
-----------------------------------------------------------------------------------------------*/
if ($_ENV['windir'] || $_SERVER['windir']) $responseID = @fopen('con', 'rb');
if (!$responseID) $responseID = @fopen('php://stdin', 'r') or die('Cannot read stdin: ' . STDERR);
if ($responseID) {
while (($response = @fgets($responseID, 1024)) !== false) {
@fclose($responseID);
return $response;
}
return "\n"; // DEFAULT SINCE NOTHING COULD BE OBTAINED
}
return "\n"; // DEFAULT SINCE NOTHING COULD BE OBTAINED
}
Thanx once again for your help (might still need it to see if this function is still accurate or needlessly versioned)
Phil