GD with FreeType 2.x

CentOS 4.4 and DA 1.29.7
Although I have tried it with many versions of DA, all to no avail.
----

Every day I find more and more software that REQUIRES GD with Freetype support - software that can not be run on my DirectAdmin server. I have lost customers due to this problem.

I have tried just about every suggestion here in the forums with recompiling this and that with no joy.

When can we expect a solution to this problem from the support folks?

This is well past being a joke.

Did u tryed my solution ?
 
We've got it on some of our servers. Once you've installed everything you need you have to get php to understand it; here's the configure command we used for php:
Code:
''./configure' '--with-apxs' '--with-curl' '--with-curl-dir=/usr/local/lib' '--with-gd' '--with-gd-dir=/usr/local/lib' '--with-freetype-dir=/usr/lib' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-kerberos' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-xml' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--with-zip' '--with-openssl' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-track-vars' '--enable-mbstring' '--enable-memory-limit'
Depending on what you've got on your server this line as-is may not work for you, but it should show you how to get GD and Freetype support.
Jeff
 
interesting and confusing at the same time ..
on a site that states freetype is needed, they suggest that GD2x now comes with freetype, their answer was this
# How do I enable the GD and FreeType Libraries ?

To enable gd support (2.x includes FreeType) open the php.ini file (in most instances located in your php/ or apache/bin/ directory), and look for the line below. Removing the semi-colon from the beginning of this line will enable the gd module:
;extension=php_gd2.dll
so what of this ?
 
After severall tries to install this,
it finally worked.

After restarting, my websites didn't want to display anymore... so i've restarted my machine... still nothing... then i restarted apache and now the only thing showing up on every different webpage is the apache default webpage...

example: http://www.memorialguild.eu

please help me, because some sites need to go up very fast again.

thank you
 
Last edited:
For FreeBSD 6.1
===========


# cd /usr/local/directadmin/customapache/
# wget http://download.savannah.gnu.org/releases/freetype/freetype-2.2.1.tar.gz
# tar zxf freetype-2.2.1.tar.gz
# cd freetype-2.2.1

vi configure
edit change make to gmake

# ./configure
# gmake
# gmake install
# cd ..
# cp build build.orig
# vi build

In function doGD replace:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype --without-x
by:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-x --with-freetype=/usr/local/lib

# cp configure.php configure.php.orig
# vi configure.php

replace:
--with-gd \
--with-gd-dir=/usr/local \
by:
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/local/lib \

# ./build clean
# nice ./build gd
# yes | nice ./build php
# /usr/local/etc/rc.d/httpd restart

Thank you I needed this.
 
combinig the tips from several previous posts, this is what I've done and has worked for me :

# cd /usr/local/directadmin/customapache/
# wget http://download.savannah.gnu.org/releases/freetype/freetype-2.2.1.tar.gz
# tar zxf freetype-2.2.1.tar.gz
# cd freetype-2.2.1
# ./configure
# make
# make install
# cd ..
# cp build build.orig
# vi build

In function doGD replace:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype --without-x
by:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-x --with-freetype=/usr/local/lib

# cp configure.php configure.php.orig
# vi configure.php

replace:
--with-gd \
--with-gd-dir=/usr/local \
by:
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/local/lib \

# ./build clean
# nice ./build gd
# yes | nice ./build php
# service httpd restart
Gawd dawumn...
That nice rebuild of php was doing alot of mojo o_0
Although I have a black background in shell, most of my screen was white, and I even saw connections with directadmin.com going on a few times, prolly updating some stuff..

So this one works on FC 3 and 4.
 
I did had to restart pretty much everything too.... exim, httpd, php ... then my server came back normal.
 
I've been pulling my hear all day to solve this.
Funyy.. I followed all the recipes and found the solution like this ;

Here was my configure.php which was keep giving errors ;

#!/bin/sh
./configure \
--with-apxs \
--with-curl \
--with-curl-dir=/usr/local/lib \
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-kerberos \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--with-openssl \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring \
--enable-memory-limit
--with-freetype \
--with-freetype-dir=/usr/lib \


I only moved the two lines from the end, to underneath the gd's location.

#!/bin/sh
./configure \
--with-apxs \
--with-curl \
--with-curl-dir=/usr/local/lib \
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/lib \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
--with-kerberos \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--with-openssl \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring \
--enable-memory-limit


Voila ! It worked.
Maybe this can be usefull for someone like me :o
 
Hi program5,

your porblem is here

--enable-mbstring \
--enable-memory-limit
--with-freetype \
--with-freetype-dir=/usr/lib \

See the line
--enable-memory-limit

It should end in a "\". The last line in the file should be the only line not ending in a "\".

Kind regards,
 
Possible for someone to post a scheme to use on a centOS 4.3?, reading threads it would seem that it depends on the OS as to what exactly is used.
Just as someone had stated, FreeType is becoming more widely used and wanted, I now have a script that requires it.
Thanks in advance
Andy
 
I would also appreciate a conclusive guide to adding freetype support to a Centos 4.x system.
 
Hello,

I am getting this same error on CentOS 4.4 - I too have followed each step in this thred and am getting most of the same errors reported by others - with the exception that I am never logged out.

<font color="red">Just wondering why freetype is exclluded in the build in the first place?</font>

I also have CentOS 4.4 btw. Followed the directions several times and edited the gd function in build BUT its not building with freetype support.Good question! Why O WHY was freetype excluded fromt the build int he first place!
 
I have a problem wit Freetype as well.
I have followed the tutorial from begin to end. No problems during it.
But after no freetype in http://mortydot.com/phpinfo.php

I have add the lines in
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/lib \

and rebuild GD and PHP.
No error's all went smooth.

But I still don't see Freetype at http://mortydot.com/phpinfo.php

Hmmzz don't know anymore from here one.
Any one?
Thanks in advantage!
 
I have a problem wit Freetype as well.
I have followed the tutorial from begin to end. No problems during it.
But after no freetype in http://mortydot.com/phpinfo.php

I have add the lines in
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/lib \

and rebuild GD and PHP.
No error's all went smooth.

But I still don't see Freetype at http://mortydot.com/phpinfo.php

Hmmzz don't know anymore from here one.
Any one?
Thanks in advantage!
What OS are u on?

Look at thin link in my post above. The key things I had to do where

1. install the development version of freetype2 as well.
2. find my where my freetype was installed
3. set the correct paths
4. rebuild PHP
5. rebuild GD.
 
changed the directory, to seems to mee the place where de freetype files are

now getting an error while building php

Code:
/usr/local/directadmin/customapache/configure.php: line 11: --with-gettext: command not found

*** There was an error while trying to configure php. Check the configure.php file

the configure.php
Code:
#!/bin/sh
./configure \
        --with-apxs \
        --with-curl \
        --with-curl-dir=/usr/local/lib \
        --with-gd \
        --with-gd-dir=/usr/local/lib \
        --with-freetype \
        --with-freetype-dir=/usr/local/lib \
        --with-gettext \
        --with-jpeg-dir=/usr/local/lib \
        --with-kerberos \
        --with-mcrypt \
        --with-mhash \
        --with-mysql=/usr/local/mysql \
        --with-pear \
        --with-png-dir=/usr/local/lib \
        --with-xml \
        --with-zlib \
        --with-zlib-dir=/usr/local/lib \
        --with-openssl \
        --enable-gd-native-ttf \
        --enable-bcmath \
        --enable-calendar \
        --enable-ftp \
        --enable-magic-quotes \
        --enable-sockets \
        --enable-track-vars \
        --enable-mbstring \
        --enable-memory-limit \

"#Locate freetype" results in this:

Code:
# locate freetype
/usr/lib/libfreetype.so.6
/usr/lib/libfreetype.so.6.3.5
/usr/share/doc/libfreetype6
/usr/share/doc/libfreetype6/CatharonLicense.txt.gz
/usr/share/doc/libfreetype6/changelog.Debian.gz
/usr/share/doc/libfreetype6/changelog.gz
/usr/share/doc/libfreetype6/ChangeLog.gz
/usr/share/doc/libfreetype6/CHANGES.gz
/usr/share/doc/libfreetype6/copyright
/usr/share/doc/libfreetype6/ft2faq.html
/usr/share/doc/libfreetype6/FTL.txt.gz
/usr/share/doc/libfreetype6/GPL.txt
/usr/share/doc/libfreetype6/license.txt
/usr/share/doc/libfreetype6/PATENTS
/usr/share/doc/libfreetype6/pcf
/usr/share/doc/libfreetype6/pcf/readme
/usr/share/doc/libfreetype6/README.Debian
/usr/share/doc/libfreetype6/TODO
/var/lib/dpkg/info/libfreetype6.list
/var/lib/dpkg/info/libfreetype6.md5sums
/var/lib/dpkg/info/libfreetype6.postinst
/var/lib/dpkg/info/libfreetype6.postrm
/var/lib/dpkg/info/libfreetype6.shlibs

I'm using Debian Etc

What em I doing wrong?
 
Last edited:
keep looking in this thread, I think I remember someone else with this scenario .
on last line of config, dont think you need the "\"
--enable-memory-limit \
I could be on the wrong track but.......
 
ok try these

--with-gd=/usr/local \
--with-freetype-dir=/usr/local/include/freetype2 \

remove the --with-freetype and remove the --with-gd-dir, for with-freetype it has to be freetype v2 not v1.
 
I have only just realised I have this probem too.

Just transferred one of my sites from an old server (which has GD2 & Truetype, and my script were working)

The part of this site that use GD2....... just displays blank (in the <img> tag), and when i go direct to the php file: "This image <url> cannot be dsplayed because it contais error."...... no PHP errors or nowt on the new server with DA.

New server : I've Apache 1.3 and PHP 4.x..... GD is installed but True/Freetype isnt.

Can't see any configure.php, I can only see configure.php5 and configure.php6 in my '/usr/local/directadmin/custombuild/configure/ap1' dir! :(

Tried looking for doGd() in build script....... nothing!

Tried ./build freetype..... compiled, restarted httpd..... nothing!


Any ideas.......



EDIT: OK, I was looking in the wrong directory? I should be in the '/usr/local/directadmin/customapache/' dir?

EDIT 2: Oh dear
#/usr/local/directadmin/customapache/:./build php

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp4.la] Error 1


I'm now scared to restart apache..... Why couldn't freetype be enabled by default..... all this faffing about breaks stuff

And why does it say I'm using Apache 2 & PHP 5?
Apache configuration file: /usr/local/directadmin/custombuild/configure/ap2/configure.apache
PHP5 configuration file: /usr/local/directadmin/custombuild/configure/ap2/configure.php5
ProFTPD configuration file: /usr/local/directadmin/custombuild/configure/proftpd/configure.proftpd
 
Last edited:
here is copy of the problem :
-o libphp4.la
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [libphp4.la] Erreur 1
*** The make has failed, do you want to try to make again? (y,n): n
EDITED : I found solution to my problem though i haven't understood yet the reason, and still is eager to understand...
I have simply followed an advice in one of the post of the thread to ".build clean" and wahoooo it worked...
I got this too...... any enlightment on how u fixed this? I tried ./build clean too but no luck.......
 
Back
Top