Before start, sorry if this topic is in the wrong place, but i'm new in the forum :S
probably this is the most common error you find when using JpGraph, but even after google for a solution I still get this error...
JpGraph Error: 25111 Can't delete cached image C:\xampp\htdocs\USF\tmp.jpgraph\ima4DA5.tmp. Permission problem?
I already tried to watch over php.ini and I made sure that GD was enabled, I also changed windows 7 security access to the temporary folder where images are saved. But it seems that something misses, any suggestion??
My code is a copy of one used as an example in the official page of JpGraph:
Code: Select all
define('PREFIX_DIR', 'tmp.jpgraph'); // images will be created here
define('PREFIX', 'imagemABC'); // prefix for the images, can be anything
define('TIME_LIMIT', 3 * 60); // 3 minutes
$tmpfname = tempnam(PREFIX_DIR, PREFIX); // create temp filename
<?php // content="text/plain; charset=utf-8"
// Some data
$ydata = array(11,3,8,12,5,1,9,13,5,7);
// Create the graph. These two calls are always required
$graph = new Graph(350,250);
// Create the linear plot
// Add the plot to the graph
// Display the graph
<img src="<?php echo get_relative_path($tmpfname); ?>">
#unlink($tmpfname); // wouldn't work correctly
return preg_replace("/^.*\/(".PREFIX_DIR."\/.*)/", "$1", $filename);
foreach (glob(PREFIX_DIR.'/'.PREFIX."*") as $filename)
#printf ( "Name: %s; age: %d<br>\n", $filename, time() - filemtime($filename) );
$age = time() - filemtime($filename);
if ($age > TIME_LIMIT)