Trying to use libchart, opensource chart, not working

This is where you share YOUR scripts with others

Moderators: macek, egami, gesf

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

Trying to use libchart, opensource chart, not working

Postby monkeytap » 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);
include("libchart1/libchart.php");

$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->setDataSet($dataSet);

$chart->setTitle("Monthly usage for www.example.com");
$chart->render("generated/demo1.png");


?>"


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!

NigelRen
php-forum Active User
php-forum Active User
Posts: 450
Joined: Fri Aug 05, 2011 9:53 am

Re: Trying to use libchart, opensource chart, not working

Postby NigelRen » 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.


Return to “Your Scripts”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest