Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1108862
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Aug 25, 6:43 AM
Size
2 KB
Mime Type
text/x-diff
Expires
Wed, Aug 27, 6:43 AM (5 h, 17 m)
Engine
blob
Format
Raw Data
Handle
715776
Attached To
rINP In-Portal
in-portal
View Options
Index: branches/unlabeled/unlabeled-1.4.4/core/kernel/utility/debugger/debugger_responce.php
===================================================================
--- branches/unlabeled/unlabeled-1.4.4/core/kernel/utility/debugger/debugger_responce.php (revision 7512)
+++ branches/unlabeled/unlabeled-1.4.4/core/kernel/utility/debugger/debugger_responce.php (revision 7513)
@@ -1,55 +1,58 @@
<?php
+ ini_set('memory_limit', -1);
+ set_time_limit(0);
+
define('FULL_PATH', realpath(dirname(__FILE__).'/../../../..') );
$sid = $_GET['sid'];
$path = isset($_GET['path']) ? $_GET['path'] : '/kernel/cache';
if (!preg_match('/^@([\d]+)@$/', $sid)) exit;
$debug_file = FULL_PATH.$path.'/debug_'.$sid.'.txt';
if (file_exists($debug_file)) {
$ret = file_get_contents($debug_file);
$ret = str_replace('#DBG_FILESIZE#', formatSize( filesize($debug_file) ), $ret);
unlink($debug_file);
}
else {
$ret = 'file not found';
}
if (function_exists('gzencode') && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
header('Content-Encoding: gzip');
echo gzencode($ret);
}
else {
echo $ret;
}
/**
* Formats file/memory size in nice way
*
* @param int $bytes
* @return string
* @access public
*/
function formatSize($bytes)
{
if ($bytes >= 1099511627776) {
$return = round($bytes / 1024 / 1024 / 1024 / 1024, 2);
$suffix = "TB";
} elseif ($bytes >= 1073741824) {
$return = round($bytes / 1024 / 1024 / 1024, 2);
$suffix = "GB";
} elseif ($bytes >= 1048576) {
$return = round($bytes / 1024 / 1024, 2);
$suffix = "MB";
} elseif ($bytes >= 1024) {
$return = round($bytes / 1024, 2);
$suffix = "KB";
} else {
$return = $bytes;
$suffix = "Byte";
}
$return .= ' '.$suffix;
return $return;
}
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.4.4/core/kernel/utility/debugger/debugger_responce.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.4.4.1
\ No newline at end of property
Event Timeline
Log In to Comment