从另一个php文件调用的PHP libchart部分工作

I just tried calling libchart example file(With added some test displays) directly it worked(Display 6 & Graph).

<?php
        echo "Display 1";
        include "../libchart/classes/libchart.php";
    echo "Display 1";
    include "../libchart/classes/libchart.php";
    echo "Display 2";

    $chart = new VerticalBarChart();
    echo "Display 3";

    $dataSet = new XYDataSet();
    echo "Display 4";
    $dataSet->addPoint(new Point("Jan 2005", 273));
    $dataSet->addPoint(new Point("Feb 2005", 421));
    $dataSet->addPoint(new Point("March 2005", 642));
    $dataSet->addPoint(new Point("April 2005", 800));
    $dataSet->addPoint(new Point("May 2005", 1200));
    $dataSet->addPoint(new Point("June 2005", 1500));
    $dataSet->addPoint(new Point("July 2005", 2600));
    $dataSet->addPoint(new Point("Aug 2005", 600));
    $chart->setDataSet($dataSet);
    echo "Display 5";
    //echo "Hello";
    $chart->setTitle("Monthly usage of www.example.com");
    $chart->render("generated/demo112.png");
    echo "Display 6";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--<html xmlns="http://www.w3.org/1999/xhtml">-->
<html>
<head>
        <title>Libchart vertical bars demonstration</title>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
</head>
<body>
        <img alt="Vertical bars chart" src="generated/demo112.png" style="border: 1px solid gray;"/>
</body>
</html>

Then tried calling from another php file, It worked fine(Display 6 & Graph).

<?php
include'VerticalBarChartTest.php';
?>

But when I tried it from another functional php file, Only Display 1&2 are displayed and doesn't move further. what could be the issue?

<?php
many logic...
include'VerticalBarChartTest.php';
?>

My logic are correct, When I comment the include file, my logic works fine. When I include this VerticalBarChartTest.php file call, it hangs with Display 2 message.