Permalink
Browse files

Fixed bug where phpinfo, used solely for detection of mod_rewrite, ge…

…ts outputted.

Signed-off-by: Christian Schepp Schaefer <schaepp@gmx.de>
  • Loading branch information...
1 parent 56e047c commit 89856da0b1ff9ff47dcab43dbee30510b479e73d @Schepp Schepp committed Oct 4, 2010
Showing with 9 additions and 4 deletions.
  1. +9 −4 booster/booster_inc.php
@@ -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'])
@@ -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;
}
/**

0 comments on commit 89856da

Please sign in to comment.