Skip to content

Commit

Permalink
Fixed bug where phpinfo, used solely for detection of mod_rewrite, ge…
Browse files Browse the repository at this point in the history
…ts outputted.

Signed-off-by: Christian Schepp Schaefer <schaepp@gmx.de>
  • Loading branch information
Schepp committed Oct 4, 2010
1 parent 56e047c commit 89856da
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions booster/booster_inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
@ini_set('zlib.output_compression',2048);
@ini_set('zlib.output_compression_level',4);

// Checking if Apache runs with mod_rewrite
if(ob_get_length()) ob_flush();
else ob_start();
phpinfo(INFO_MODULES);
$result = ob_get_clean();
if(stristr($result,'mod_rewrite')) define('BOOSTER_MOD_REWRITE', TRUE);
else define('BOOSTER_MOD_REWRITE', FALSE);

// Starting gzip-compressed output if zlib-compression is turned off
if (
isset($_SERVER['HTTP_ACCEPT_ENCODING'])
Expand Down Expand Up @@ -469,10 +477,7 @@ public function __construct()
$this->js_hosted_minifier_path = realpath(dirname(__FILE__).'/'.$this->js_hosted_minifier_path);

// Checking if Apache runs with mod_rewrite
if(ob_get_length()) ob_clean();
phpinfo(INFO_MODULES);
$result = ob_get_clean();
if(stristr($result,'mod_rewrite')) $this->mod_rewrite = TRUE;
$this->mod_rewrite = BOOSTER_MOD_REWRITE;
}

/**
Expand Down

0 comments on commit 89856da

Please sign in to comment.