I authored a PHP code for exhibiting a graph with data read from the text file. I examined it on my small localhost (Wamp) also it labored perfectly...

Now I authored exactly the same code within the web server ( APACHE/LINUX) . I copied and pasted the googlechart library folder around the root... i.e. '/var/www/' ... and attempted using these two instructions in the beginning ...

include dirname('/var/www/') . '/GChartPhp/gChart.php'
require ('/var/www/GChartPhp/gChart.php')

However the page doesn't get loaded ( ERROR on web site: Oops! This site seems damaged) ... I attempted printing something before wrinkles which will get printed after which is rerouted towards the above pointed out error ..... meaning the issue is in loading the damn libraries ... I've no clue why they wont get loaded... I've the GChartPhp folder around the root directory !!

Help needed as soon as possible !

EDIT : The Whole CODE !

> < ? php  // I added spaces to the php tag because it wont display otherwise on this website !! 

include realpath('.') . "/GChartPhp/gChart.php";  
//include dirname('/var/www/') . '/GChartPhp/gChart.php';

//require ('/var/www/GChartPhp/gChart.php');  

$keyval = array();
//$keyval ['x'][] = array();
//$keyval ['y'][]= array();

$file= fopen('/var/www/graph1.txt', 'r') or die("can't open file");

if ($file) {
 while (!feof($file)) {    
  $line = trim(fgets($file));
  if (strlen($line)) {  
   $fields = explode(",", $line);
   $num = count($fields);  
   for ($i=0;$i<$num;$i++)
   $keyval[$i]        = $fields[$i];  
   if ($i==0)
   $keyval ['x'][] = $fields[$i];  
   if ($i%2==0)
      $keyval ['y'][] = $fields[$i];
          $keyval ['y1'][] = $fields [$i];

$barChart = new gStackedBarChart(450,450);


$barChart->setTitle("ON OFF GRAPH ! \r\n TEST");  

? >   

< img src=" < ? php print $barChart->getUrl();?>" / > <br> THE GRAPH  
< / body>  
<  / html>