954,152 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

JPGraph+Help

Am gettin an error msg like this-->
The image “ http://localhost/linegrph.php” cannot be displayed, because it contains errors.
while tryin 2 run my code on localhost..

Wen I comment d statemnt, $graph->Stroke(), nthng at all displys..
Plseeee do tell me a solution..

Thnks in advance :)

tessy7
Junior Poster in Training
51 posts since Apr 2008
Reputation Points: 15
Solved Threads: 3
 

What error messages are you getting? Can you post them on here.

phper
Posting Whiz in Training
213 posts since Nov 2006
Reputation Points: 22
Solved Threads: 19
 

As I postd earlier, this is d error msg am getting..

The image “ http://localhost/filename.php” cannot be displayed, because it contains errors.

tessy7
Junior Poster in Training
51 posts since Apr 2008
Reputation Points: 15
Solved Threads: 3
 

Please post the code for filename.php

ryan_vietnow
Posting Pro
578 posts since Aug 2007
Reputation Points: 28
Solved Threads: 71
 

This is d sample pgm I hav taken frm d tutorials..

<?php
include ("jpgraph.php" );
include ("jpgraph_line.php");

// 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,"auto");
$graph->SetScale("textlin");

// Create the linear plot
$lineplot=new LinePlot($ydata);
$lineplot->SetColor("blue");

// Add the plot to the graph
$graph->Add($lineplot);

// Display the graph
$graph->Stroke();
?>

tessy7
Junior Poster in Training
51 posts since Apr 2008
Reputation Points: 15
Solved Threads: 3
 

I think the class itself has the error.Try to check them more intensively to find out why it is not working.

ryan_vietnow
Posting Pro
578 posts since Aug 2007
Reputation Points: 28
Solved Threads: 71
 

put php_value output_buffering "0" in your .htaccess or

Set output_buffering=Off in php.ini file.

then
put ob_clean();
ob_end_clean();
in your image generating script.
Thats it.
Hope This will help you

greensign
Newbie Poster
1 post since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You