Click to See Complete Forum and Search --> : getting php to work with jpgraph


tsukushi
07-20-2004, 04:58 AM
i'm trying to use JPGraph

i've downloaded everything considered needed for it to works
and reconfigured my php as follow:

./configure' '--with-mysql' '--with-gd' '--with-zlib' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-mbstring' '--enable-mbregex' '--with-jpeg-dir=/usr/local/lib' '--with-pnglib-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-ttf=/usr/local/lib'

but still my phpinfo() appears like this:
gd
GD Support enabled
GD Version bundled (2.0.23 compatible)
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled


why i dont get the
freetype Support enabled
freetype linkage with ttf library


i got the error of the following when trying to plot graph:
'This PHP build has not been configured with TTF support. You need to recompile your PHP installation

i think this occured when jpgraph.php runs the following :
// Check that this PHP has support for TTF fontsif( !function_exists('imagettfbbox') ) {
JpGraphError::Raise('This PHP build has not been configured with TTF support. You need to recompile your PHP installation with FreeType support.');
exit();}

please tell me what should i do?
what else do i need?
i have been searching for answer since 2 weeks ago..

tsinka
07-20-2004, 02:42 PM
Hi,

did you try to configure with --with-ttf (or --with-ttf=/usr/local) instead of --with-ttf=/usr/local/lib ?

Using /usr/local instead of /usr/local/lib is recommend for most parameters since php might search for the header files in /usr/local/lib/include otherwise.

Additionally add --enable-freetype2 or --enable-freetype and --enable-ttf or --enable-native-gd-ttf

Depending on the OS (mainly Linux) you might need to install the corresponding devel (e.g. freetype2-devel) packages in order to successfully compile PHP.

Thomas

tsukushi
07-20-2004, 11:55 PM
Originally posted by tsinka
Hi,

did you try to configure with --with-ttf (or --with-ttf=/usr/local) instead of --with-ttf=/usr/local/lib ?

Using /usr/local instead of /usr/local/lib is recommend for most parameters since php might search for the header files in /usr/local/lib/include otherwise.

Additionally add --enable-freetype2 or --enable-freetype and --enable-ttf or --enable-native-gd-ttf

Depending on the OS (mainly Linux) you might need to install the corresponding devel (e.g. freetype2-devel) packages in order to successfully compile PHP.

Thomas

hi,

./configure' '--with-mysql' '--with-gd' '--with-zlib' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-mbstring' '--enable-mbregex' '--with-jpeg-dir=/usr/local/lib' '--with-pnglib-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-ttf=/usr/local' '--enable-freetype' '--enable-native-gd-ttf'


i've done with above configuration parameters, but seems that it's still not working...

i checked my dir,
i have:
/usr/local/include/freetype2/freetype

and also these library in /usr/local/lib
libfreetype.a
libfreetype.la*
libfreetype.so@
libfreetype.so.9

so, is my installation of freetype is correct?
or do i pass my parameter to ./configure correctly?

thanks

tsinka
07-24-2004, 06:05 AM
Hi,

what happens if you try the following:

./configure' '--with-mysql' '--with-gd' '--with-zlib' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-mbstring' '--enable-mbregex' '--with-jpeg-dir=/usr/local' '--with-pnglib-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-ttf=/usr/local' '--enable-freetype2' '--enable-native-gd-ttf'

or

./configure' '--with-mysql' '--with-gd' '--with-zlib' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-mbstring' '--enable-mbregex' '--with-jpeg-dir=/usr/local' '--with-pnglib-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-ttf=/usr/local' '--enable-freetype' '--enable-native-gd-ttf'

or

./configure' '--with-mysql' '--with-gd' '--with-zlib' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-mbstring' '--enable-mbregex' '--with-jpeg-dir=/usr/local' '--with-pnglib-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-ttf' '--enable-freetype' '--enable-native-gd-ttf'



Thomas

tsukushi
07-26-2004, 03:44 AM
Originally posted by tsinka
Hi,

what happens if you try the following:

./configure' '--with-mysql' '--with-gd' '--with-zlib' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-mbstring' '--enable-mbregex' '--with-jpeg-dir=/usr/local' '--with-pnglib-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-ttf=/usr/local' '--enable-freetype2' '--enable-native-gd-ttf'

or

./configure' '--with-mysql' '--with-gd' '--with-zlib' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-mbstring' '--enable-mbregex' '--with-jpeg-dir=/usr/local' '--with-pnglib-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-ttf=/usr/local' '--enable-freetype' '--enable-native-gd-ttf'

or

./configure' '--with-mysql' '--with-gd' '--with-zlib' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable-mbstring' '--enable-mbregex' '--with-jpeg-dir=/usr/local' '--with-pnglib-dir=/usr/local' '--with-freetype-dir=/usr/local' '--with-ttf' '--enable-freetype' '--enable-native-gd-ttf'



Thomas

thanks tsinka, i've tried the above 3 configuration, but still freetype is not working...

i checked my dir,
i have:
/usr/local/include/freetype2/freetype

and also these library in /usr/local/lib
libfreetype.a
libfreetype.la*
libfreetype.so@
libfreetype.so.9

does my freetype being installed correctly?
do i need freetype1 ? i only installed freetype2, i dunno what error occurs during installation of freetype1

tsukushi
07-29-2004, 02:52 AM
just to report that i've fixed it

i dunno where's the reason, i just changed to php-4.3.8 instead of 4.3.7 and it works fine