473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

compile php with gd and freetype support for jpgraph

3
I have php (5.2.4) compiled on redhat 4.0 as followed :
Expand|Select|Wrap|Line Numbers
  1. ./configure \
  2.  --with-oci8=$ORACLE_HOME
  3.  --with-apxs=/usr/local/apache/bin/apxs \
  4.  --with-config-file-path=/usr/local/apache/conf \
  5.  --enable-sigchild \
  6.  --with-gd \
  7.  --with-ttf=/usr/include/freetype2 \
  8.  --with-freetype-dir=/usr/include/freetype2 \
  9.  --with-gd-native-ttf \
  10.  --enable-shared
  11.  
the make & make install runs without errors

But when using the jpgraph, I get an error png image that there is no TTF-support and says to compile php with FreeType support.

What I doing wrong?
testjpgraph.php
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. include ("/install_apache_standalone/jpgraph-1.21b/src/jpgraph.php");
  3. include ("/install_apache_standalone/jpgraph-1.21b/src/jpgraph_bar.php");
  4.  
  5. $db_conn = ocilogon("****","****","***");
  6. $cmdstr = "select * from test";
  7. $parsed = ociparse($db_conn,$cmdstr);
  8. ociexecute($parsed);
  9. $nrows = ocifetchstatement($parsed, $results);
  10. for ($i = 0; $i < $nrows; $i++)
  11. {
  12.   $data[] = $results["MARKS"][$i];
  13.   $leg[] = $results["NAME"][$i];
  14. }
  15.  
  16. $graph = new Graph(250,150,"auto");
  17. $graph->SetScale("textint");
  18. $graph->img->SetMargin(50,30,50,50);
  19. //$graph->AdjBackgroundImage(0.4,0.7,-1); //setting BG type
  20. //$graph->SetBackgroundImage("linux_pez.png",BGIMG_FILLFRAME); //adding image
  21. $graph->SetShadow();
  22.  
  23. $graph->xaxis->SetTickLabels($leg);
  24.  
  25. $bplot = new BarPlot($data);
  26. $bplot->SetFillColor("lightgreen"); // Fill color
  27. $bplot->value->Show();
  28. $bplot->value->SetFont(FF_ARIAL,FS_BOLD);
  29. $bplot->value->SetAngle(45);
  30. $bplot->value->SetColor("black","navy");
  31.  
  32. $graph->Add($bplot);
  33. $graph->Stroke();
  34.  ?>
  35.  
  36.  
Nov 7 '07 #1
2 3946
Atli
5,058 Expert 4TB
Hi.

I would assume there is a problem with the FreeType TTF support on your system, although I would have thought the compiler would have picked up on that.

Have you checked if the FreeType thing is working properly?
Or if this is a bug in the PHP code itself?
Nov 10 '07 #2
luckyG
3
Hi,

Yes it is a bug in php I have downloaded 5.2.5 rc2 of php, and then it works.

thanks for the reply.

Regards
Nov 10 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: awaegel | last post by:
Hello, I've been running php/apache/etc locally on my powerbook for a long time, but am having problems activating freetype with a new version of php. I'm using: php 4.4.0 freetype 2.1.10...
1
by: francescomoi | last post by:
Hi. I compiled PHP by using: -------------- './configure' '--prefix=/usr/local/php' '--with-apxs2=/usr/local/httpd/bin/apxs' '--with-mysql=/usr/local/mysql'...
0
by: mchristopher | last post by:
I'm having trouble compiling DOM XML support into PHP 4.4.2 on CentOS 4.3. Everytime I attempt to compile, it spits back this: .... chmod 755 /usr/lib/apache/libphp4.so Installing PHP CLI...
7
by: Glich | last post by:
Hi, where can I download freetype (>= 2.1.7)? I need it to use matplotlib. I have search a lot but still can not find it. Thanks!
2
by: Lorenzo Thurman | last post by:
I keep getting this error when trying to use fonts with Image_Graph: PHP Fatal error: Call to undefined function: imagettfbbox() in /usr/local/lib/php/Image/Canvas/GD.php on line 1240 After...
3
by: rahmawaktu | last post by:
Dear list, i am new to this forum and to JPGraph too. I just install jpgraph to create a graphic to my website. But i got error. Here is the complete code : First is MySQL Database : ( 2...
0
by: luckyG | last post by:
I have php (5.2.4) compiled on redhat 4.0 as followed : ./configure \ --with-oci8=$ORACLE_HOME --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/apache/conf \ ...
2
by: paeh | last post by:
what's wrong for this php code. when I run did not display anything in browser.. this is code: <?php include ("C:/Program Files/Apache Software...
2
by: AARTHISUBBU | last post by:
i m quiet new to wamp... is it possible to run jpgraph codes in wamp... else i have to install jpgraph separately and to run?.. if i can run jpgraph codes in wamp,what i have to do? i m using...
0
by: eureka2050 | last post by:
Hi all, I am creating a radar chart containing 2 plots using jpgraph. My code is as follows:- include ("./jpgraph/src/jpgraph.php"); include ("./jpgraph/src/jpgraph_radar.php"); //...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.