Trying to use libchart, opensource chart, not working

This is where you share YOUR scripts with others

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 6
Joined: Fri Oct 21, 2011 11:50 pm

Fri Oct 28, 2011 10:41 am

Hello All,

I am trying to use libchart, an open souce chart program to run charts on my site of mysql data I have.

However I am running into issues at the very beginning. I am following the tutorials, but to no avail.

This is the error I am receiving on my site when I try to run the test chart they provide.

" Warning: include(libchart1/libchart.php): failed to open stream: No such file or directory in /var/www/charttest.php on line 3 Warning: include(): Failed opening 'libchart1/libchart.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/charttest.php on line 3 Fatal error: Class 'VerticalBarChart' not found in /var/www/charttest.php on line 5"

This is the code I am running -

ini_set('display_errors', 1);

$chart = new VerticalBarChart(500, 250);

$dataSet = new XYDataSet();
$dataSet->addpoint(new Point("Jan 2005", 273));
$dataSet->addPoint(new Point("Feb 2005", 321));
$dataSet->addPoint(new Point("March 2005", 442));
$dataSet->addPoint(new Point("April 2005", 711));


$chart->setTitle("Monthly usage for");


I have set permission to the included directory to 777, but not every single file within that directory. Am not sure if granting permission of the directory automatically grants it to all files within, but that seems like that would make sense to me. Could be wrong though.

Any help would be great!

php-forum Fan User
php-forum Fan User
Posts: 622
Joined: Fri Aug 05, 2011 9:53 am

Fri Oct 28, 2011 12:36 pm

You'll need to allow at least read access to the user that PHP is running as. You could set all files to 774.

Post Reply