debug on the demo server

This commit is contained in:
Martynas Mickevicius
2010-07-06 17:30:32 +03:00
parent f1e30fea1e
commit c342ad07e0
2 changed files with 5 additions and 3 deletions

View File

@@ -46,12 +46,9 @@ function PMA_chart_profiling($data)
$chartData[$key] = $value; $chartData[$key] = $value;
} }
error_reporting(E_ALL);
echo "before new";
$chart = new PMA_pChart_Pie( $chart = new PMA_pChart_Pie(
__('Query execution time comparison (in microseconds)'), __('Query execution time comparison (in microseconds)'),
$chartData); $chartData);
echo "after new";
echo $chart->toString(); echo $chart->toString();
} }

View File

@@ -33,10 +33,12 @@ abstract class PMA_pChart_Chart extends PMA_Chart
protected function render() protected function render()
{ {
echo "before ob_start";
ob_start(); ob_start();
imagepng($this->chart->Picture); imagepng($this->chart->Picture);
$output = ob_get_contents(); $output = ob_get_contents();
ob_end_clean(); ob_end_clean();
echo "after ob_end_clean";
$this->imageEncoded = base64_encode($output); $this->imageEncoded = base64_encode($output);
} }
@@ -44,8 +46,11 @@ abstract class PMA_pChart_Chart extends PMA_Chart
public function toString() public function toString()
{ {
$this->prepareDataSet(); $this->prepareDataSet();
echo "after neprepareDataSetw";
$this->prepareChart(); $this->prepareChart();
echo "after prepareChart";
$this->render(); $this->render();
echo "after render";
return '<img id="pChartPicture1" src="data:image/png;base64,'.$this->imageEncoded.'" />'; return '<img id="pChartPicture1" src="data:image/png;base64,'.$this->imageEncoded.'" />';
} }