issue was the ROOT static, not gzip
This commit is contained in:
parent
8c9eb07ca8
commit
c15f472d8d
2 changed files with 60 additions and 59 deletions
|
@ -18,8 +18,9 @@ error_reporting(-1);
|
||||||
ini_set('log_errors', 1);
|
ini_set('log_errors', 1);
|
||||||
ini_set('error_log', ROOT .'errors.log');
|
ini_set('error_log', ROOT .'errors.log');
|
||||||
|
|
||||||
// Start output buffering
|
// Start output buffering with gzip and no gzip fallback
|
||||||
ob_start();
|
if(!ob_start('ob_gzhandler'))
|
||||||
|
ob_start();
|
||||||
|
|
||||||
// Include Configuration
|
// Include Configuration
|
||||||
require_once ROOT .'_sakura/config/config.php';
|
require_once ROOT .'_sakura/config/config.php';
|
||||||
|
|
|
@ -17,7 +17,7 @@ if(isset($_GET['m'])) {
|
||||||
switch($_GET['m']) {
|
switch($_GET['m']) {
|
||||||
case 'avatar':
|
case 'avatar':
|
||||||
// Set path to no avatar picture
|
// Set path to no avatar picture
|
||||||
$noAvatar = ROOT_DIRECTORY .'content/img/no-av.png';
|
$noAvatar = ROOT .'content/img/no-av.png';
|
||||||
|
|
||||||
// If ?u= isn't set or if it isn't numeric
|
// If ?u= isn't set or if it isn't numeric
|
||||||
if(!isset($_GET['u']) || !is_numeric($_GET['u'])) {
|
if(!isset($_GET['u']) || !is_numeric($_GET['u'])) {
|
||||||
|
@ -31,7 +31,7 @@ if(isset($_GET['m'])) {
|
||||||
|
|
||||||
case 'background':
|
case 'background':
|
||||||
// Set path to no avatar picture
|
// Set path to no avatar picture
|
||||||
$noBackground = ROOT_DIRECTORY .'content/pixel.png';
|
$noBackground = ROOT .'content/pixel.png';
|
||||||
|
|
||||||
// If ?u= isn't set or if it isn't numeric
|
// If ?u= isn't set or if it isn't numeric
|
||||||
if(!isset($_GET['u']) || !is_numeric($_GET['u'])) {
|
if(!isset($_GET['u']) || !is_numeric($_GET['u'])) {
|
||||||
|
@ -44,10 +44,10 @@ if(isset($_GET['m'])) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$serveImage = ROOT_DIRECTORY .'content/pixel.png';
|
$serveImage = ROOT .'content/pixel.png';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$serveImage = ROOT_DIRECTORY .'content/pixel.png';
|
$serveImage = ROOT .'content/pixel.png';
|
||||||
}
|
}
|
||||||
|
|
||||||
$serveImage = file_get_contents($serveImage);
|
$serveImage = file_get_contents($serveImage);
|
||||||
|
|
Reference in a new issue