I loaded gdchart and the dependencies but I am still getting this error when I try to view any of the example scripts.
Warning: GDChart:

ut() [gdchart.out]: Unable to open './line.png' for writing in /var/www/chart.php on line 12.
Here is the code

without the line numbers of course)
1 <?php
2
3 $g = new GDChart(GDChart::LINE);
4 $g->addValues(array(2.5, 5.1, 8.6, 12.0, 15, 9, 8, 7));
5 $g->addValues(array(5.0, 8.0, 9.2, 10.2, 7, 8, 10, 9));
6 $g->addValues(array(8.0, 10.0, 14.0, 18.2, 16, 14, 12, 10));
7 $g->setLabels(array("Jan","Feb","Mar","Apr","May","Jun","Jul", "Aug"));
8 $g->setColors(array(0x1133aa, 0xaa3311, 0x33aa11));
9 $g->requestedYmin = 0;
10 $g->ylabelDensity = 25;
11 $g->ylabelFmt = "%.0f";
12 $g->out(640,480,GDChart::PNG,"./line.png");
13
14 ?>
I have tried changing line 12 to: $g->out(640,480,GDChart::PNG); with no luck.
I am running Ubuntu 9.04 desktop, apache2, php5
Any help would be greatly appreciated.