summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/backend.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/bin/backend.php b/bin/backend.php
index cef568c..b69fb0d 100644
--- a/bin/backend.php
+++ b/bin/backend.php
@@ -1,5 +1,17 @@
<?php
-if(!ob_start("ob_gzhandler")) ob_start();
+
+// Check PHP modules
+if (function_exists('dl'))
+{
+ if (!extension_loaded('json'))
+ dl(json.so);
+ if (!extension_loaded('zlib'))
+ dl(zlib.so);
+}
+
+if(!ob_start("ob_gzhandler"))
+ ob_start();
+ob_start("ob_gzhandler");
header('Content-Type: application/json; charset: utf-8');
header('Content-Encoding: gzip');