This is what I came up with to display the value of LimitRequestBytes, very elaborate for just a simple thing, and I betcha somewhere out there in PHPland this could be done much more simply:
/*-----------------------------------------------------------------------------------------------------------------------------
There is no native method in PHP to obtain a value that is in a separate CONFIG file, particularly
/etc/httpd/conf.d/php.conf, therefore, you will have to obtain it yourself the hard way: splice up the
file and retrieve and set into a session variable, or, obtain from the existing session variable
-------------------------------------------------------------------------------------------------------------------------------*/
function &getLimitRequestBody() {
global $limitRequestBodyFilePath;
if ($_SESSION['limitRequestBody']) {
return $_SESSION['limitRequestBody'];
} else {
$fileID = @fopen($limitRequestBodyFilePath, 'r');
if (!$fileID) return 0; // BOMB OUT - $limitRequestBodyFilePath SET IN CSV FILE AND IS REQUIRED TO OBTAIN LimitRequestBody
$contents = @fread($fileID, filesize($limitRequestBodyFilePath));
@fclose($fileID);
preg_match('/LimitRequestBody[\\s\\t]*([0-9]+)\n*/i', $contents, $matchArray);
$_SESSION['limitRequestBody'] = (int)trim($matchArray[1]);
return (int)trim($matchArray[1]);
}
}
Phil