5 // capture PHP's default setting (may get overridden in config
6 $_oc = ini_get('zlib.output_compression');
8 // allow access only if builder is enabled
9 require dirname(__FILE__) . '/../config.php';
10 if (! $min_enableBuilder) {
14 if (isset($_GET['oc'])) {
15 header('Content-Type: text/plain');
18 } elseif (isset($_GET['text']) && in_array($_GET['text'], array('js', 'css', 'fake'))) {
19 ini_set('zlib.output_compression', '0');
20 $type = ($_GET['text'] == 'js')
21 ? 'application/x-javascript'
22 : "text/{$_GET['text']}";
23 header("Content-Type: {$type}");
26 } elseif (isset($_GET['docroot'])) {
27 if (false === realpath($_SERVER['DOCUMENT_ROOT'])) {
28 echo "<p class=topWarning><strong>realpath(DOCUMENT_ROOT) failed.</strong> You may need "
29 . "to set \$min_documentRoot manually (hopefully realpath() is not "
30 . "broken in your environment).</p>";
32 if (0 !== strpos(realpath(__FILE__), realpath($_SERVER['DOCUMENT_ROOT']))) {
33 echo "<p class=topWarning><strong>DOCUMENT_ROOT doesn't contain this file.</strong> You may "
34 . " need to set \$min_documentRoot manually</p>";
36 if (isset($_SERVER['SUBDOMAIN_DOCUMENT_ROOT'])) {
37 echo "<p class=topNote><strong>\$_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] is set.</strong> "
38 . "You may need to set \$min_documentRoot to this in config.php</p>";