View Full Version : GD with FreeType 2.x
What to do for compile GD with FreeType 2.x support?
tribal-dolphin
09-24-2004, 02:33 AM
Hello,
To do that, you must compile gd with freetype support.
Do this :
cd /usr/local/directadmin/customapache/
wget http://ovh.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz
tar zxf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install
Freetype 2.x is now installed on /usr/local/lib directory
Now, modify the build script (./build) for compile GD with FreeType :
In function doGD replace
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype
by
./configure --with-png=/usr/local --with-jpeg=/usr/local --with-freetype=/usr/local
Now, build PHP WITH compile of GD (type Y at prompted)
./build php
and after do
service httpd restart
That's all.
hostpc.com
09-24-2004, 06:15 AM
install: too few arguments
Try `install --help' for more information.
tribal-dolphin
09-24-2004, 06:42 AM
Ooooooops !!
It's not install but make install.
I'll modify my first post.
Didn't work for me, any ideas?
Thanks,
Seth
Thank you for using PHP.
/usr/local/directadmin/customapache/configure.php: line 7: --with-gd: command not found
*** There was an error while trying to configure php. Check the configure.php file
Is my error via shell.
-Seth
tribal-dolphin
10-09-2004, 09:38 AM
It's an error on your file. It's not from PHP or GD.
Check the content of your file.
./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 \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-openssl \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars
tribal-dolphin
10-09-2004, 10:18 PM
This is my file. It run with no error.
#!/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-freetype-dir=/usr/local/lib \
--with-kerberos \
--with-mcrypt \
--with-mhash \
--with-mysql \
--with-pear \
--with-pcre \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars
Can I see your php output? For some reason mine will not compile with Freetype
tribal-dolphin
10-10-2004, 10:35 AM
go to http://s1.tribal-dolphin.net/phpinfo.php
I have tried everything I know how to do with no luck.
tribal-dolphin
10-12-2004, 05:43 AM
Can you post here your doGD function (in ./build script)
thanks
mvveelen
10-27-2004, 06:44 AM
Originally posted by tribal-dolphin
Freetype 2.x is now installed on /usr/local/lib directory
Now, modify the build script (./build) for compile GD with FreeType :
In function doGD replace
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype
by
./configure --with-png=/usr/local --with-jpeg=/usr/local --with-freetype=/usr/local
Now, build PHP WITH compile of GD (type Y at prompted)
./build php
and after do
service httpd restart
That's all. [/B]
Got stuck here. Everything went fine, and I edited the configure.php file so it looks like this :
#!/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-freetype-dir=/usr/local/lib \
--with-kerberos \
--with-mcrypt \
--with-mhash \
--with-mysql \
--with-pear \
--with-pcre \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
But when I recompile GD and PHP it still won't show the freetype......
What to do ?
http://www.salesplaza.nl/info.php
tribal-dolphin
10-27-2004, 07:13 AM
Originally posted by mvveelen
Got stuck here. Everything went fine, and I edited the configure.php file
You don't have to modify configure.php but the file named build
mvveelen
10-27-2004, 07:18 AM
Thanx.
Doing that right now ;)
mvveelen
10-27-2004, 07:19 AM
One more question :
Do I have to add something like --with-gif=/usr/local to get support with .gif ??
mvveelen
10-27-2004, 07:25 AM
It still doesn't support the freetype :
'./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' '--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'
tribal-dolphin
10-27-2004, 07:27 AM
It's not necessary to build GD with gif.
GD include gif support for read (2.0.25) and read/write (2.0.28)
mvveelen
10-27-2004, 07:31 AM
Ok, but I now rebuild PHP and everything went fine, but still no support for freetype :(
mvveelen
10-27-2004, 07:36 AM
Strange, when I do ./build GD it shows :
** Configuration summary for gd 2.0.28:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Xpm library: no
Support for pthreads: yes
tribal-dolphin
10-27-2004, 07:40 AM
In your PHPINFO, go to the section named GD and see if FREETYPE appears.
This How-To is for GD + Freetype, not PHP + Freetype !!
mvveelen
10-27-2004, 07:44 AM
gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
This is what it says.
I guess I meant GD+Freetype...... it is to get rid of the problems with the
Fatal error: Call to undefined function: imagefttext()
and
Fatal error: Call to undefined function: imagefttbox()
messages. I have a script that worked on another server and now it shows me this errors. It seems to me I have to install the freetype support then ?
tribal-dolphin
10-27-2004, 07:50 AM
I send you a PM (personnal message)
mvveelen
10-27-2004, 07:58 AM
Sent you 2 back ;)
To do that, you must compile gd with freetype support.
Do this :
cd /usr/local/directadmin/customapache/
wget http://ovh.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz
tar zxf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install
Freetype 2.x is now installed on /usr/local/lib directory
Now, modify the build script (./build) for compile GD with FreeType :
In function doGD replace
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype
by
./configure --with-png=/usr/local --with-jpeg=/usr/local --with-freetype=/usr/local
Now, build PHP WITH compile of GD (type Y at prompted)
./build php
and after do
service httpd restart
That's all. [/B]
:-(
gcc -g -O2 -o .libs/annotate annotate.o /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib -L/usr/local/lib ./.libs/libgd.so -ljpeg -lfreetype -lz -lm -Wl,--rpath -Wl,/usr/local/lib
./.libs/libgd.so: undefined reference to `pthread_mutex_unlock'
./.libs/libgd.so: undefined reference to `pthread_mutex_destroy'
./.libs/libgd.so: undefined reference to `pthread_mutex_lock'
./.libs/libgd.so: undefined reference to `pthread_mutex_init'
*** Error code 1
Stop in /usr/local/directadmin/customapache/gd-2.0.25.
*** Error code 1
Stop in /usr/local/directadmin/customapache/gd-2.0.25.
*** Error code 1
Stop in /usr/local/directadmin/customapache/gd-2.0.25.
*** The make has failed, do you want to try to make again? (y,n):
What to do?
mvveelen
10-28-2004, 12:20 AM
Tried almost everything now :
followed all the steps, no errors occured. Build GD and PHP, no errors occured. Restarted httpd.
Nothing shows up on http://www.salesplaza.nl/info.php
What else can I do now ?
tribal-dolphin
10-28-2004, 12:30 AM
Originally posted by RosT
What to do?
I don't know. I do this with GD2.0.28 with no error. Test with this version of GD.
You can see the result HERE (http://s1.tribal-dolphin.net/phpinfo.php)
markus
11-26-2004, 09:56 PM
mvveelen: I've seen in your phpinfo that you finally got it!
I'm having the same problem. I did everything and my phpinfo still does not show support for freetype.
Could you please explain how did you solve it? ...or anyone have an idea?
Thanks
klassik
12-16-2004, 12:01 PM
Anyone know how to do this right? I've been trying for a while now. and its just not working at all for me.
shackrat
02-15-2005, 09:40 AM
I'm tearing my hair out over this. I can get GD to compile fine per the instructions. I can also compile php without a problem too, but freetype doesn't show up in phpinfo().
The proper configuration directives do show up however. Anyone who figured this out willing to share their secret?
Thanks,
Steve
BigWil
02-18-2005, 03:25 AM
Still nothing eh? I am still having problems because of the freetype2. I got it on one machine and stupid me.... I didn't write down what it was.
Still getting this:
./.libs/libgd.so: undefined reference to `pthread_mutex_unlock'
./.libs/libgd.so: undefined reference to `pthread_mutex_destroy'
./.libs/libgd.so: undefined reference to `pthread_mutex_lock'
./.libs/libgd.so: undefined reference to `pthread_mutex_init'
Then make dies.
nobaloney
02-18-2005, 08:24 AM
What OS are you using?
Googling one of your error lines returns a lot of hits; all of them appear to be for FreeBSD.
Jeff
BigWil
02-18-2005, 10:10 AM
Sorry my bust. I didn't know any other OS got pthreads errors. ;-)
Just upgraded DA to the latest, rebuilt freetype, png, jpeg, and trying to upgrade GD.
FreeBSD 4.10
freetype2-2.1.7_4
png-1.2.5_6
jpeg-6b_3
gd-2.0.22,1
BigWil
02-18-2005, 11:25 AM
Got it and will document it here as well as in my docs. Freetype2 seems to install a limited version of the X libraries. Because of this there probably arises a dependency issue when trying to install GD with Freetype without xpm. None the less the following configure works with Freetype.
./configure --with-jpeg=/usr/local --with-png=/usr/local
This allowed config to auto detect the appropriate settings:
** Configuration summary for gd 2.0.33:
Support for PNG library: yes
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Fontconfig library: yes
Support for Xpm library: yes
Support for pthreads: yes
Again using --without-x didn't work if using --with-freetype. Without both works and with both works but no other combination.
Big Wil
PeterB
03-02-2005, 04:31 AM
Can't install it here either,
Everything goes well, settings included in the build file, I can build without getting any errors (and it tells that there is FreeType support), but it doesn't work..
'./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' '--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'
No freetype there..
Does anyone have an idea why PHP won't compile with Freetype?
shackrat
03-02-2005, 07:09 AM
I got these instructions from the web host where some of my other sites are located (they owed me a favor)
Go and download the newest, stable version of FreeType2:
http://freetype.sourceforge.net/
While logged in as root on the server, with a copy of the archive for
FT2, gunzip/untar it and change to the directory and type:
./configure --prefix-/usr
make
make install
After that's complete, while compiling PHP w/ the options, add the
following to the configure line, along with your other options:
--with-freetype-dir=/usr
I followed them to the letter and it worked the first time.
Good luck!
PeterB
03-03-2005, 04:44 AM
That's just the problem, PHP doesn't want to compile, any changes I make (both in build and configure.php) aren't working, phpinfo() keeps showing the same thing..
How can I compile PHP with new settings?..
PeterB
03-03-2005, 08:21 AM
Got it! :) After installing freetype, execute these commands:
./build clean
./build php
And it will work :)
Peter
Geffy
03-06-2005, 03:19 PM
Thank you, I never thought to look in the build script itself. I personally built freetype2 from the freebsd ports tree, then all I had to do was convince da that it was there by modifying the build script :p
tdldp
06-10-2005, 12:21 PM
Hi,
I followed all steps trying to install Freetype support
Everything went ok on following steps :
cd /usr/local/directadmin/customapache/
wget http://ovh.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz
tar zxf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install
i managed also to
./configure --with-png=/usr/local --with-jpeg=/usr/local --with-freetype=/usr/local
but when doing :
./build php
i went on errors, on things i have not had time to note.
Just after, i lost SSH root connection to the machine.
I have no more access to SSH neither to directadmin on port 22.
What's going on out there ????
thks for urgent answer
Machine is FC3 - Diradmin latest - exim 4.51 - clamAV 0.851 - awstats
Those are the soul addons brought to the machine.
BigWil
06-10-2005, 01:10 PM
Your SSH problems would have nothing to do with your customapache build. SSH isn't modified at all by DA except to modify the /etc/ssh/sshd_config file when you create a user that has SSH privileges.
Big Wil
tdldp
06-13-2005, 12:34 AM
Indeed, and hadn't time to post answer, but sshd and named bugged for some unknown reason (apparently a known problem)
I rebooted the machine and there it goes...
Yet GD and Freetype hasn't been updated, i'll have to see that indeed.
Thks a lot
tdldp
06-14-2005, 07:26 AM
ok retried today to update GD with Freetype 2.
Refollowed build php steps.
When prompted regarding GD answered yes.
I then let the machine work alone on the build and come to the same error i had last time :
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
newbie on this, can anyone explain me the problem encountered, and eventuelly a solution or an idea to explore in order to solve the problem ???
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...
Thks a lot.
Tdldp
netswitch
06-16-2005, 04:53 AM
Hello
I just followed the how to, it went fine.
I also did a small modifiacation :
freetype is installed under /usr/local/lib
the howto states to modify the freetype-dir to /usr/local
so in my setup, I modifyed the build script to use :
--with-freetype=/usr/local/lib
maybe this can help avoiding some trouble.
snaaps
07-18-2005, 06:06 AM
I give up!
It will not work!
www.ccc5.nl/php.php
I have tried everythink, I Am Using Fedora Core 3, latets DirectAdmin, GD 2.0.28, php 4.3.11, apache 1.33.
its seems that nothing work for me!
I have installed freetype
change line in ./build ( i have tried also ...freetype=/usr/local/lib)
build clean
build php
restart htppd
every time after I run build php I most restart Directadmin.
I've had, like most of you, some trouble with enabling freetype in gd.
But finally after some time found the solution.
first install freetype2.**
cd /usr/local/directadmin/customapache/
wget http://ovh.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz
tar zxf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install
next part (2)
open /usr/local/directadmin/customapache/configure.php
and make sure the following lines are in there, if not add them.
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/local/lib \
next part (3)
in the /usr/local/directadmin/customapache/ directory
type in:
./build clean
./build gd
./build php
with these line you recompile gd & php ( with the ./build php, be sure to type Y when prompted for installing GD )
finally restart apache with.
service httpd restart
After this freetype worked finally worked for me.
mo.mentum
07-26-2005, 01:52 PM
Hey.
You might need to modify the "build" script to make GD compile with FreeType.
So AFTER you've installed FreeType, and BEFORE you run the ./build commands for gd/php..you must edit the following line:
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype --without-x
and change the "without" to "with":
./configure --with-png=/usr/local --with-jpeg=/usr/local --with-freetype --without-x
in the doGD() part of the "build" script.
gl
.m
Sheldon
07-26-2005, 11:43 PM
worked for me first time.
even with the latest version of freetype.
dougl
04-14-2006, 02:03 PM
I had a little trouble. I followed all the instructions provided here which got me really close. GD compiled but when the "build" script got to compiling PHP, I got the following error:
grep: /usr/lib/libfreetype.la: No such file or directory
/bin/sed: can't read /usr/lib/libfreetype.la: No such file or directory
libtool: link: `/usr/lib/libfreetype.la' is not a valid libtool archive
make: *** [libphp4.la] Error 1
I don't know why it was complaining that it couldn't find libfreetype.la in /usr/lib since I explicitly entered "/usr/local/lib" in the configure.php and the build script. PHP even seemed to know where it was during the configure stage:
checking for FreeType 2... /usr/local/lib
Anyway, I simply made a symbolic link in /usr/lib:
ln -s /usr/local/lib/libfreetype.la libfreetype.la
That generated a warning about libfreetype.la being moved but it did compile and it seems to work.
-dougl
Geffy
04-15-2006, 06:28 PM
not sure if it would have worked but you might have needed to tell the php configure script to look in /usr/local/lib using
-L/usr/local/lib
on the command line. It should work, or would if you were running the configure command manually. I am not sure if the build script passes those types of variables in.
jaracanda
05-14-2006, 05:04 AM
I can't get it working. I'm building GD and freetype successfully. Php building also goed by without errors. When PHP is done building, phpinfo tells me that Freetype support is now enabled. However from this point PHP is broken at front-end. When I try to call whatever .php script from the browser, I get a timeout.
Any clue what to do?
nobaloney
05-16-2006, 09:34 AM
Have you looked at the httpd error log for the domain to see what's going on?
Jeff
jaracanda
05-17-2006, 08:31 AM
I just checked the error and access log for the domain. There are no entries for the page requests at all.
?
yacine
05-30-2006, 01:46 AM
Hi,
I have used the method described in the top of this discussion to have freetype.
The problem is solved but I have just a warning :
Copying php.ini..
/usr/local/lib/php.ini already exists, skipping.
Enabling register_globals...
PHP Installed.
[root@serv1 customapache]# service httpd restart
Arrêt de httpd : [ OK ]
Démarrage de httpd :PHP Warning: Unknown(): Unable to load dynamic library './p
hp_gd2.dll' - ./php_gd2.dll: cannot open shared object file: No such file or dir
ectory in Unknown on line 0
[ OK ]
I'm on DA version 1.26.6, FC 3 and Freetype freetype-2.1.10
jaumesb
06-30-2006, 04:03 PM
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
Mik3yZ
08-21-2006, 04:23 AM
thanks! that last howto did it here on FC4
Mike
jaracanda
08-23-2006, 02:56 AM
Originally posted by Mik3yZ
thanks! that last howto did it here on FC4
Mike
For me too on FreeBSD. Thanks!
jojosgerrit
08-24-2006, 06:50 AM
I have installed freetype as the howto's describe.
All goes well without any errors, but when i look in my phpinfo then freetype doenst show up.
I know this question has here before but i want to mention that i am running apache 2 and php 5.1.5.
With apache 1.3 there were never problems and it did very well but now with apache 2 it wont run.
I tried every solution in the forum and nothing works.
Here some info about my system:
OS: centOS 4.3
Apache 2
php 5.1.5
freetype 2.1.9
Hopefully someone can give me a hint in the right direction or has the answer to this problem.
thnx in advance
jojosgerrit
08-29-2006, 01:36 PM
Is there anyone who can help me?
thnx in advance
I get an error saying freetype2 cannot be found
This is the biggest PITA. I don't even NEED it working but I HAVE to get it working now. I have followed everything to a tee and it will not compile.
Fantole
09-01-2006, 11:54 AM
Originally posted by bsod
I've had, like most of you, some trouble with enabling freetype in gd.
But finally after some time found the solution.
first install freetype2.**
cd /usr/local/directadmin/customapache/
wget http://ovh.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz
tar zxf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install
next part (2)
open /usr/local/directadmin/customapache/configure.php
and make sure the following lines are in there, if not add them.
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/local/lib \
next part (3)
in the /usr/local/directadmin/customapache/ directory
type in:
./build clean
./build gd
./build php
with these line you recompile gd & php ( with the ./build php, be sure to type Y when prompted for installing GD )
finally restart apache with.
service httpd restart
After this freetype worked finally worked for me.
Hi ;)
Me i've got a problem :(
I lost the connexion with my host after this
./build php
Then i reconnecte, and i write service httpd restart
But no result, no freetype on my host.
What the probleme ?
Have you an idea ?
jojosgerrit
09-01-2006, 07:08 PM
Again i am asking for help with my freetype installation as i mentioned on the second last post on page 3.
Can someone give me more info or some help?
Or doesnt anyone has got any clue?
thnx in advance
Fantole
09-21-2006, 05:05 AM
:rolleyes: UP :confused:
Arkaos
09-22-2006, 12:51 PM
When trying to recompile ssh closed down :s
Fantole
09-22-2006, 12:58 PM
Me too :o
Arkaos
09-22-2006, 02:39 PM
its also killed the da daemon mysql and mail :eek:
Fantole
09-22-2006, 03:30 PM
Ask your HOST a reboot
All will set out again like front
But always without freetype
I have the same problem as you :(
And with each installation, even error
Arkaos
09-24-2006, 01:48 AM
Finally got it working without breaking the box this time, yay!!!!
Fantole
09-24-2006, 03:00 AM
I would have liked that it is the same for me :(
Arkaos
09-24-2006, 03:18 AM
PM Fantole
Fantole
09-24-2006, 03:32 AM
I answered your MP ;)
Fantole
10-05-2006, 03:14 AM
UP :rolleyes:
Arkaos
10-05-2006, 03:55 AM
Fantole if you follow the instructions to the letter it does work and doesnt break the box
Fantole
10-05-2006, 05:11 AM
And how I makes when my Shell loses connection
after
. /build php
??? :rolleyes:
Arkaos
10-05-2006, 09:56 AM
Then you may not being doing it right :p
Fantole
10-05-2006, 11:59 AM
Look this
www.graph-world.be/and.avi
What's the problem ? :o
Fantole
10-08-2006, 02:33 PM
:rolleyes:
pgeluk
10-31-2006, 02:32 AM
Originally posted by mvveelen
Ok, but I now rebuild PHP and everything went fine, but still no support for freetype :(
Same problem...
I saw in your phpinfo that you have it working now.
please let me know how I can fix it
if I do ./configure in the freetype directory:
---
GNU make (>= 3.79.1) or makepp (>= 1.19) is required to build FreeType2.
Please try
`GNUMAKE=<GNU make command name> ./configure'.
or >&2
`GNUMAKE="makepp --norc-substitution" ./configure'.
---
devone
11-20-2006, 11:47 AM
Originally posted by pgeluk
Same problem...
I saw in your phpinfo that you have it working now.
please let me know how I can fix it
if I do ./configure in the freetype directory:
---
GNU make (>= 3.79.1) or makepp (>= 1.19) is required to build FreeType2.
Please try
`GNUMAKE=<GNU make command name> ./configure'.
or >&2
`GNUMAKE="makepp --norc-substitution" ./configure'.
---
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
devone
11-20-2006, 11:58 AM
please note FreeBSD 6.x
-------------------------------
freetype lib need gnu make or gmake
please test gmake from command line
# gmake -v
and check version "GNU Make 3.80"
If gmake not install?
cd /usr/ports/devel/gmake
make
make install
make clean
.....
bigboy
11-27-2006, 01:36 AM
#yes | nice ./build php
for FreeBSD5.x this error
......................
If configure fails try --with-jpeg-dir=<DIR>
configure: error: PNG support requires ZLIB. Use --with-zlib-dir=<DIR>
--with-gettext: not found
*** There was an error while trying to configure php. Check the configure.php file
resolveit
11-27-2006, 03:25 AM
Originally posted by jaumesb
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
This HowTo works on CentOs 4. I do have an addition....
# mkdir /usr/X11R6/lib/X11/fonts/truetype
copy required ttf files from windows to /usr/X11R6/lib/X11/fonts/truetype
Your users can now use the fonts you provided in their GD pictures/graphs.
nobaloney
11-27-2006, 09:40 AM
Onno,
I wish this didn't confuse me as much as it does :) .
I'm not sure what you mean by
Your users can now use the fonts you provided in their GD pictures/graphs.
Do you mean in images they create on the fly?
Thanks.
Jeff
TheBear
01-15-2007, 07:43 PM
Originally posted by bigboy
#yes | nice ./build php
for FreeBSD5.x this error
......................
If configure fails try --with-jpeg-dir=<DIR>
configure: error: PNG support requires ZLIB. Use --with-zlib-dir=<DIR>
--with-gettext: not found
*** There was an error while trying to configure php. Check the configure.php file
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.
I do need this for one of my hosting accounts that needs freetype support in GD and they are bugging me to get this solved.
Anyone have any further ideas? I am downloading the 236meg AVI file someone posted in this thread and will take a look at it for any ideas.
Just wondering why freetype is exclluded in the build in the first place?
./build clean
and
./build php y
Did it for me. Thanks for all the help :)
works
01-27-2007, 11:20 AM
I am trying to get freetype installed too on centos 4.3 I followed everything in this thread including the post above this, I am getting disconnected when the build is going on.
/bin/sh /usr/local/directadmin/customapache/php-4.4.4/libtool --silent --preserv e-dup-deps --mode=compile gcc -Imain/ -I/usr/local/directadmin/customapache/php -4.4.4/main/ -DPHP_ATOM_INC -I/usr/local/directadmin/customapache/php-4.4.4/incl ude -I/usr/local/directadmin/customapache/php-4.4.4/main -I/usr/local/directadmi n/customapache/php-4.4.4 -I/usr/local/include -I/usr/local/include/freetype2 -I/ usr/local/directadmin/customapache/php-4.4.4/ext/mbstring/mbregex -I/usr/local/d irectadmin/customapache/php-4.4.4/ext/mbstring/libmbfl -I/usr/local/directadmin/ customapache/php-4.4.4/ext/mbstring/libmbfl/mbfl -I/usr/include/mysql -I/usr/loc al/directadmin/customapache/php-4.4.4/ext/xml/expat -I/usr/local/directadmin/cus tomapache/php-4.4.4/TSRM -I/usr/local/directadmin/customapache/php-4.4.4/Zend -g -O2 -prefer-non-pic -c main/internal_functions.c -o main/internal_functions .lo
Every time I am getting disconnected when build reaches as in the above quote. Help is appreciated thank you.
I don't mind helping you. Shoot me a PM and we can get it going for you :)
PauGasol
03-07-2007, 06:55 PM
Works with Apache 2 and php 4.4.6 ? Any update how to ? Thanks
should work, have you tried?
TheBear
03-11-2007, 07:29 PM
Personally, I have tried every suggestion posted and still can't get it working on my system :(
Open to any other suggestions. It would really help me to get this working. I have some software running on one of my hosting accounts that needs this for their Captcha system.
Dale
PauGasol
03-18-2007, 07:09 AM
Personally, I have tried every suggestion posted and still can't get it working on my system :(
Open to any other suggestions. It would really help me to get this working. I have some software running on one of my hosting accounts that needs this for their Captcha system.
Dale
Same here, any help?
swiep
04-12-2007, 05:49 AM
And one more :(
CentOs 4.3, Apache2, PHP5, all 64bit.
Terrorhawk
04-19-2007, 03:57 PM
finaly after 2 day's of working on this i found the solution
edit the build script with your editor (like pico)
pico build
then look at this part
doGD() {
cd $CWD;
FILE=${CWD}/gd-${GD_VER}.tar.gz
checkFile $FILE
echo "Extracting ...";
tar xzf $FILE
echo "Done.";
cd gd-${GD_VER}
echo "Configuring gd-${GD_VER}...";
./configure --with-png=/usr/local --with-jpeg=/usr/local --without-freetype --without-x
just change --without-freetype to --with-freetype
then do
./build clean
./build gd
./build php
service http restart
and now it sould work
Jinyoki
05-12-2007, 07:23 AM
Hello,
I'am trying to install freetype on a server with FC5, directadmin.
I have followed the instructions from:
http://www.directadmin.com/forum/showthread.php?t=4205&page=2
When doing ./build php I got the following error:
If configure fails try --with-jpeg-dir=<DIR>
configure: error: PNG support requires ZLIB. Use --with-zlib-dir=<DIR>
/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
Somebody knows whats going wrong?
Thanks!
Jinyoki
Hello
I have just done the install of freetype with the new custumbuild of directadmin.
The install of freetype is exactly the same, but the configure.php file is not in the same place.
If you are using php5, the configure.php is in : configure/ap2/configure.php5
(ap2 for apache2, so f you have apache 1, choose ap1)
(im on a fedora core6)
Sky
Hi,
I have a really strange problem. In the user registration the captcha image shows, but it doens't display any fonts?
Check it here (http://www.limburgracingteam.nl/component/option,com_smf/Itemid,113/action,register/). That's just one example, it isnt working on more sites.
Here is my php_info (http://bnext.nl/info.php), which looks ok to me?
Does anyone know what's wrong here?
RadMan
05-23-2007, 08:34 AM
Hi,
I have a really strange problem. In the user registration the captcha image shows, but it doens't display any fonts?
Check it here (http://www.limburgracingteam.nl/component/option,com_smf/Itemid,113/action,register/). That's just one example, it isnt working on more sites.
Here is my php_info (http://bnext.nl/info.php), which looks ok to me?
Does anyone know what's wrong here?
Could be any of 3 things:
1) Permissions (777)
2) Has the font file (.ttf) been uploaded and
3) Has GD been compiled with TrueType fonts?
Cheers
Could be any of 3 things:
1) Permissions (777)
2) Has the font file (.ttf) been uploaded and
3) Has GD been compiled with TrueType fonts?
Cheers
1) Permissions are 777
2) Yes, the fonts are in place
3) Yes, as you can see in the php_info link.
I've been searching for 2 days now, but I can't find the solution to this problem.
RadMan
05-23-2007, 11:02 AM
1) Permissions are 777
2) Yes, the fonts are in place
3) Yes, as you can see in the php_info link.
I've been searching for 2 days now, but I can't find the solution to this problem.
Maybe you coudl try building it again..
cd /usr/local/directadmin/customapache
./build clean
./build php n
Once built: service httpd restart
Maybe you coudl try building it again..
cd /usr/local/directadmin/customapache
./build clean
./build php n
Once built: service httpd restart
I rebuilded gd and php for over 10 times, also with different configure options. But everytime the same, it wont display TTF fonts. Its really very strange.
RadMan
05-23-2007, 11:09 AM
1) Permissions are 777
2) Yes, the fonts are in place
3) Yes, as you can see in the php_info link.
I've been searching for 2 days now, but I can't find the solution to this problem.
One more.. ;)
Check again and make sure the following is in your php config file.. : /usr/local/directadmin/customapache/configure.php
--with-gd \
--with-gd-dir=/usr/local \
--with-freetype \
--with-freetype-dir=/usr/lib \
--with-gettext \
--with-jpeg-dir=/usr/local/lib \
..
..
--enable-gd-native-ttf
That's about all my level of intelligence can help you with.. Sorry.. :confused:
GranTW
05-23-2007, 02:33 PM
Hi,
If possible post the code for the part of the script that is responsible for writing the string into the image. Look for the imagettftext function.
All I can think of is a if you say gd and freetype are all setup correct:
a) You have a @ before the function thereby hiding the error message from being output if any
b) the text colour is the same as the background.
Thanks for the suggenstions!
Tried recompiling one more time, but with the exact same result.
Check this (http://www.limburgracingteam.nl/component/option,com_smf/Itemid,113/action,register/) is clearly not a color problem.
Only thing I can think of is that the path to the freetype libs in the configure script is incorrect. What file(s) should I look for?
./configure \
--with-apxs \
--with-curl \
--with-snmp=shared,/usr/include/net-snmp \
--with-curl-dir=/usr/local/lib \
--with-gd \
--with-gd-dir=/usr/local \
--with-freetype \
--with-freetype-dir=/usr/include \
--enable-gd-native-ttf \
ls /usr/include/freetype*
/usr/include/freetype:
freetype.h ftnameid.h ftxerr18.h ftxgdef.h ftxgsub.h ftxopen.h ftxsbit.h
fterrid.h ftxcmap.h ftxgasp.h ftxgpos.h ftxkern.h ftxpost.h ftxwidth.h
/usr/include/freetype2:
freetype
GranTW
05-24-2007, 02:39 AM
But that doesn't explain why PHP isn't outputting any error message like it should do if there was a problem with the freetype library or not finding the font.
To test if it's your php script search google for a premade image verification script and test that out.
If that works then you know it's your PHP coding at fault.
Grant
http://bnext.nl/test.php
<?php
function test ($string, $test)
{
echo $string . '... ';
if ($test)
echo "success.\n";
else
echo "fail.\n";
}
$token = "Testing GD!";
// Create image
$pic = ImageCreate (300, 300);
test ('Creating image', $pic);
$col2 = ImageColorAllocate ($pic, 0, 0, 100);
$col1 = ImageColorAllocate ($pic, 200, 200, 200);
// Test PNG/JPG functionality
ob_start();
$res1 = @ImagePNG ($pic);
$res2 = @ImageJPEG ($pic);
ob_clean();
test ('Testing PNG output', $res1);
test ('Testing JPEG output', $res2);
// Test TrueType functionality
$ttfont = trim (`locate -n 1 .ttf`);
test ('Testing FreeType', @ImageTTFText
($pic, 30, 0, 10, 40, $col1, $ttfont, $token));
test ('Testing FreeType2', @ImageFTText
($pic, 30, 0, 10, 40, $col1, $ttfont, $token, array()));
// Test Type1 functionality
$font = @ImagePsLoadFont (trim (`locate -n 1 .pfb`));
if ($font)
$res = @ImagePsText ($pic, $token, $font, 10, $col1, $col2, 0, 0);
test ('Testing the Type1 library', ($font && $res));
test ('Destroying image', ImageDestroy($pic));
?>
http://bnext.nl/test2.php (image = displayed, but no fonts).
<?php
// het random nr. aanmaken en gecodeerd opslaan in php sessie
session_start();
$randomnr = rand(1000, 9999);
$_SESSION['randomnr2'] = md5($randomnr);
// captcha plaatje met nummer maken - afmetingen kun je aanpassen gebruikte font
$im = imagecreatetruecolor(100, 38);
// Kleurenbepaling
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
// zwarte rechthoek tekenen - afmetingen kun je aanpassen aan verschillende fonts
imagefilledrectangle($im, 0, 0, 200, 35, $black);
// hier - font.ttf' vervangen met de locatie van je eigen font bestand
$font = '/usr/share/fonts/truetype/msttcorefonts/arial.ttf';
// schaduw toevoegen
imagettftext($im, 35, 0, 22, 24, $grey, $font, $randomnr);
// randomnr. toevoegen
imagettftext($im, 35, 0, 15, 26, $white, $font, $randomnr);
// voorkomen dat afbeelding ge-cached wordt
header("Expires: Wed, 1 Jan 1997 00:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
// plaatje verzenden naar browser
header ("Content-type: image/gif");
imagegif($im);
imagedestroy($im);
?>
GranTW
05-24-2007, 05:28 AM
Ok well your code works fine.
If you are running a redhat based OS then what is the output of
rpm -qa | grep freetype
Grant
Im using Ubuntu 6.06 LTS and have installed the needed freetype packages.
But I just noticed that the needed freetype libs are in /usr/local/lib, so recompiling one more time! :)
Ok, this is really weird.
On SMF the fonts are now showing, but the test script gives me:
Fatal error: Call to undefined function: imagettftext()
while the php_info (http://bnext.nl/info.php) shows that ttf support is enabled?
GranTW
05-24-2007, 06:50 AM
Use
--with-freetype-dir=/usr/local \
and remove
--with-freetype \
--enable-gd-native-ttf \
and recompile.
My complete configure.php is
#!/bin/sh
./configure \
--with-apxs2 \
--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-openssl \
--with-mcrypt \
--with-mhash \
--with-mysql=/usr \
--with-mysqli=/usr/bin/mysql_config \
--with-pear \
--with-png-dir=/usr/local/lib \
--with-xml \
--with-zlib \
--with-zlib-dir=/usr/local/lib \
--with-zip \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring \
--enable-memory-limit \
--with-freetype-dir=/usr/local
and that's for php5 and apache2 taken from the new custombuild.
Grant
OMG!
I just realize that I need to modify the configure.php_ap2 and not configure.php!!
I feel so stupid, but thanks for all help!!!
Edit: Everything works perfect now, can't believe i've modifing the wrong configure file for 2 days :o
RadMan
05-24-2007, 07:17 AM
Here's my complete config:
./configure \
--with-apxs \
--with-curl \
--with-curl-dir=/usr/local/lib \
--with-gd \
--with-gd-dir=/usr/local \
--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 \
--with-imap=/usr/local/imap-2004c1 \
--enable-bcmath \
--enable-calendar \
--enable-ftp \
--enable-magic-quotes \
--enable-sockets \
--enable-track-vars \
--enable-mbstring \
--enable-memory-limit \
--enable-gd-native-ttf
uguronur
05-31-2007, 08:54 PM
I've had, like most of you, some trouble with enabling freetype in gd.
But finally after some time found the solution.
first install freetype2.**
cd /usr/local/directadmin/customapache/
wget http://ovh.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz
tar zxf freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure
make
make install
next part (2)
open /usr/local/directadmin/customapache/configure.php
and make sure the following lines are in there, if not add them.
--with-gd \
--with-gd-dir=/usr/local/lib \
--with-freetype \
--with-freetype-dir=/usr/local/lib \
next part (3)
in the /usr/local/directadmin/customapache/ directory
type in:
./build clean
./build gd
./build php
with these line you recompile gd & php ( with the ./build php, be sure to type Y when prompted for installing GD )
finally restart apache with.
service httpd restart
After this freetype worked finally worked for me.
You are the best my friend..I give you big hug..Thanks a lot...
regards...
Ugur Onur
kanary
06-10-2007, 03:07 AM
my server is broke thanks to this
nobaloney
06-10-2007, 05:14 PM
my server is broke thanks to this
Kanary, if you'd like help you'll have to be a bit more specific.
Please tell us your server OS/distribution and version, and also your DirectAdmin version number.
Thanks.
Jeff
TheBear
06-10-2007, 10:17 PM
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.
TheBear
06-10-2007, 10:27 PM
tar zxf freetype-2.1.9.tar.gz
I get errors when trying to un tar this download. I have downloaded it 6 times already. the error is always the same (yes, I did delete the old file between downloads).
The error is always the same:
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Error exit delayed from previous errors
Any other suggestions?
This machine is a fairly recent clean CentOS 4.4 install with only DA installed, no custom mods.
Terrorhawk
06-11-2007, 05:55 AM
try this link
wget http://dfn.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz
Terrorhawk
06-11-2007, 05:57 AM
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 ?
nobaloney
06-12-2007, 09:32 PM
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:
''./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
AndyII
07-04-2007, 09:08 PM
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 ?
alloin
07-20-2007, 01:36 PM
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
labrocca
07-28-2007, 03:45 AM
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.
Duboux
07-31-2007, 04:24 PM
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.
program5
09-01-2007, 12:47 PM
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
resolveit
09-01-2007, 01:11 PM
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,
AndyII
10-01-2007, 02:10 PM
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.
bruin03
12-23-2007, 11:35 PM
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!
bruin03
12-24-2007, 01:38 AM
Apparently getting Freetype to Work with GD and PHP directly are two diff things.
i got it working on centOS 4.4 after following the directions here:
http://forums.deftechgroup.com/showthread.php?t=2288
Hopefully this works for someone else! :)
MortyDot
01-11-2008, 08:54 AM
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!
bruin03
01-11-2008, 10:48 AM
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.
MortyDot
01-11-2008, 12:14 PM
changed the directory, to seems to mee the place where de freetype files are
now getting an error while building php
/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
#!/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:
# 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?
AndyII
01-11-2008, 01:15 PM
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.......
Chrysalis
01-12-2008, 11:39 AM
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.
Peter Laws
10-16-2008, 04:51 AM
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
Peter Laws
10-16-2008, 08:57 AM
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.......
Well back at it again with no luck :confused:
Powered by vBulletin™ Version 4.0.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.