PHP Call to undefined function imagettfbbox()
Ok, here's the situation. I've compiled and installed Apache2 and PHP 5 on my Slackware 10 machine. I compiled with GD support. All of the GD functions seem to work until I get to the TTF related ones.
So, first I checked php.net. It said I needed FreeType 1 and/or 2, jpeg, png, xpm, and zlib. Well, I already compiled those in without any configure/make warnings/errors. On to google. It seems many people are having the same issue, and none have had it resolved, as far as I could tell. Here's my config (from config.nice): Code:
'./configure' \ Code:
Array I'm beginning to think it's an issue of versions, but I don't know for sure. I should go through config.log for more info, but since it's past midnight and I'm exhausted, I thought I'd let someone else do the thinking for a while. :-) Any help is GREATLY appreciated!! |
Did you try :
./configure ... ... --with-freetype --with-freetype-dir=/usr/lib ... |
Yep, I already tried that. However, one thought occurred to me. I am beginning to think the gd package I got from linuxpackages.net didn't have freetype support compiled in. I'm compiling it now with freetype and I'll point php to the new install location to see if my idea is right.
|
Scrap that idea. Moving on to others...
|
With php > 4.3 it is advised to use its built-in gd support
Also did you try : --with-freetype-dir=/usr/include/freetype2/freetype |
Well, my first attempts at compiling PHP with GD involved using the bundled GD version. It worked except for freetype. Then I tried the separate one from linuxpackages.net, and finally a self-compiled one. Each worked with the exception of freetype support.
I have tried '--with-freetype-dir=/usr/include/freetype2/freetype' but it didn't work. This just doesn't make sense to me. Configure indicates that FreeType was found, as well as XPM. During the compilation, I can see the -lfreetype and -lXpm switches and there are no warnings or errors that they don't exist. Make completes perfectly, and yet neither xpm nor freetype shows up in phpinfo() or gd_info(). :( Any other suggestions? |
I suppose you already tried ' --with-freetype-dir=/usr ', when you test php do you restart apache each time ?
|
Yes to both. I've even restarted my machine just to reload everything.
I think I'll watch some TV for a while, stuff my face, and let my mind wander for a while. Maybe I'll have one of those "Oh, of course!" moments. :) |
Yes!! I got it working... but I did something I shouldn't have to do (afaik). I ran 'make clean' before re-compiling. Shouldn't it automatically detect which files need to be recompiled and compile them?
Anyway, I'm glad it's working. I can finally go back to business as usual! :D Thanks for the input. |
Quote:
|
Oh yeah! Make clean! It works :)
Sorry for posting in old topic but I had to express my joy. |
Thank God
I've been pulling my hair out with this shit - check my version of gd and freetype
recompiled php like 50 time and then we have make clean which saves the day thanx alot for this post really help |
Make Clean!!! :eek:
I was having the same problem!!! Now it works: Many thx!!! |
Make Clean Saves the Day!
soan:
"I've been pulling my hair out with this shit - check my version of gd and freetype recompiled php like 50 time..." Totally man.. I was about ready to install umbuntu :Pengy: again.. btw, my problem was with the imagettfbbox() :scratch: .. recompiled about 51 times.. :cool: (hahaha) and with make clean, it did the trick. :D :D :D thanks guys! :Pengy: :Pengy: p.s. I hope this thing doesn't show i'm on a winblows box... (currently running umbuntu debian on my lapytopy..) anybody got an idea how to install the default software modem from a toshiba satelite model A75-S125? :scratch: |
Apparently the makefile needs some cleaning...
|
Thanks!
I lost one and a half day of work. I though building my own PHP solution...:confused:
Thanks also to google that have shown a link to this forum with the soluton (make ckean).:D |
Add one success story, make clean worked for me as well. Thankfully I didn't bang my head against the screen for too long.
|
Talk about a stale thread, but IT WORKED, so thank you! Dang, who would have thought that it would still be a problem after so many years? Until I ran "make clean" I was having the same issue. Hooray for linuxquestions.org :)
|
Add yet one more to the success list :-) so simple!
|
A quicker way
Chalk up another user helped by this thread. Yes, this is still a problem under php 5.3 all these years later!
Rather than doing `make clean` and recompiling everything, I cleaned only gd. It worked fine: Code:
find ext/gd -name '*.lo' -exec rm {} \; Oran, http://www.arigora.com/ |
Start again with fresh source .... I have had probles where make clean doesn't work iether.
|
Make Clean?
I am not able to (or just don't know how) to use the "make clean" statement, when I attempt to use it, I get this error message:
Code:
make: *** No rule to make target `clean'. Stop. This is a VPS so I should have full access to do what I need to. These are the statements I ran: Code:
cd /usr/local/directadmin/customapache/ Code:
/usr/bin/ld: cannot find -lltdl |
Quote:
This is also a very old thread that's only marginally related to your problem, so you should start a new thread if you continue to have problems after running ./configure. Kevin Barry |
Quote:
"Call to undefined function imagettfbbox()" ------------ At what point do I run ./configure? before or after the ./build? This GD problem has been plaguing my development for a week now. This is the closest thing I could find to my issue, just wanted some more information about it to hopefully resolve the problem. Thank you in advance. |
My phpinfo seemed to show the correct options:
Code:
'./configure' '--prefix=/opt/php52' '--enable-force-cgi-redirect' '--enable-fastcgi' '--with-regex=php' '--enable-calendar' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-iconv' '--enable-exif' '--enable-ftp' '--with-gettext' '--enable-mbstring' '--with-pcre-regex' '--enable-shmop' '--enable-sockets' '--enable-wddx' '--with-libxml-dir=/usr' '--with-zlib' '--with-openssl=/usr' '--enable-soap' '--enable-zip' '--with-mhash=yes' '--with-gd' '--with-mysql' '--with-mysqli' '--with-pdo-mysql' '--with-pear' '--with-jpeg-dir=/usr/lib' '--with-freetype-dir=/lib64' '--with-ttf=/lib64' '--enable-gd-native-ttf' Then, no trouble with that famous "make clean", then make and make install and...it doesn't work |
All times are GMT -5. The time now is 04:32 AM. |