DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 26th March 2009
cksraj cksraj is offline
Real Name: Crew Kasy Raj
Port Guard
 
Join Date: Mar 2009
Posts: 12
Post PHPLot installation issue - Not able to see graph

Hi all,

I have PHP Version 5.2.8 with GD extended. I have installed PHPlot-5.0.6(copied the files into directory called phplot)

gd
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

After installation I am trying to run very simple phplot script, but it is showing the following unexpected results. Please advice what could be wrong in my side!!!

<?
include("phplot/phplot.php");
$data = array(array('', 10), array('', 1));
$plot = new PHPlot();
$plot->SetDataValues($data);
$plot->SetTitle('First Test Plot');
$plot->DrawGraph();
?>

Last edited by Carpetsmoker; 26th March 2009 at 08:23 AM. Reason: Remove binary content, use attachments
Reply With Quote
  #2   (View Single Post)  
Old 26th March 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Was posting all that binary output really necessary? seriously.. that's horrible.

There isn't a problem, GD is generating a PNG format image.. It's a MIME-type issue.

Code:
<?
include("phplot/phplot.php");
$data = array(array('', 10), array('', 1));
$plot = new PHPlot();
$plot->SetDataValues($data);
$plot->SetTitle('First Test Plot');
header("Content-type: image/png");
$plot->DrawGraph();
?>
EDIT: This may be wrong, I just realized you're using some sort of assisting library.. it's probably a configuration issue of some sort, apologies.

Last edited by BSDfan666; 26th March 2009 at 06:55 AM.
Reply With Quote
  #3   (View Single Post)  
Old 31st March 2009
cksraj cksraj is offline
Real Name: Crew Kasy Raj
Port Guard
 
Join Date: Mar 2009
Posts: 12
Smile Thanks for your reply...

Really sorry if I gave you a trouble.

I tried your advice, but still it is not working. But when I placed the code in separate file namely Graph.php and refered in image tag, it is working fine.

<IMG SRC="<?= $myConfig->BASEURL ?>Graph.php">

Thanks
Kumaresh
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHPLOT Graph Boundaries cksraj Programming 0 24th September 2009 08:58 AM
phplot-5.0.5 cannot install maxrussell FreeBSD General 1 18th February 2009 02:55 PM
Installation Issue : FreeBSD 7.0-RELEASE on Dell D630 zelut FreeBSD Installation and Upgrading 4 3rd October 2008 12:44 PM
OpenSolaris installation issue BlueJayofEvil Solaris 4 19th August 2008 08:12 PM
MRTG Graph khizla FreeBSD General 2 16th June 2008 03:29 AM


All times are GMT. The time now is 04:09 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick