943,929 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 1944
  • PHP RSS
Apr 10th, 2008
0

JPGraph+Help

Expand Post »
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
Reputation Points: 15
Solved Threads: 3
Light Poster
tessy7 is offline Offline
49 posts
since Apr 2008
Apr 10th, 2008
0

Re: JPGraph+Help

What error messages are you getting? Can you post them on here.
Reputation Points: 15
Solved Threads: 17
Junior Poster
phper is offline Offline
189 posts
since Nov 2006
Apr 11th, 2008
0

Re: JPGraph+Help

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

The image “http://localhost/filename.php” cannot be displayed, because it contains errors.
Reputation Points: 15
Solved Threads: 3
Light Poster
tessy7 is offline Offline
49 posts
since Apr 2008
Apr 11th, 2008
0

Re: JPGraph+Help

Please post the code for filename.php
Reputation Points: 28
Solved Threads: 71
Posting Pro
ryan_vietnow is offline Offline
578 posts
since Aug 2007
Apr 11th, 2008
0

Re: JPGraph+Help

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();
?>
Reputation Points: 15
Solved Threads: 3
Light Poster
tessy7 is offline Offline
49 posts
since Apr 2008
Apr 11th, 2008
1

Re: JPGraph+Help

I think the class itself has the error.Try to check them more intensively to find out why it is not working.
Reputation Points: 28
Solved Threads: 71
Posting Pro
ryan_vietnow is offline Offline
578 posts
since Aug 2007
Jul 26th, 2011
0
Re: JPGraph+Help
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
Last edited by Ezzaral; Jul 26th, 2011 at 1:46 pm. Reason: Snipped email. Please keep it on site.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
greensign is offline Offline
1 posts
since Jul 2011

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: POST with link without forms
Next Thread in PHP Forum Timeline: Submit button at end of row only works for last row





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC