LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-09-2006, 07:01 PM   #1
ihopeto
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Rep: Reputation: 0
php image functions dont work


I am trying to use the Image functions within php.

example - imagefontwidth

I get this error

Fatal error: Call to undefined function: imagefontwidth() in _________ on line 10

So I read that I need to install the GD libraries when I configure PHP.

I have version 4.4.1 of PHP running.

the php documentation indicates the gd lib is included and I should use configure --with-gd so I did that.

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd

I then read this

To enable GD-support configure PHP --with-gd[=DIR], where DIR is the GD base install directory. To use the recommended bundled version of the GD library (which was first bundled in PHP 4.3.0), use the configure option --with-gd. GD library requires libpng and libjpeg to compile.

this is where I need help...where do I put these files and what should the list look like.

Let me start there.

Thanks

Brian
 
Old 11-10-2006, 01:34 AM   #2
asquante
Member
 
Registered: Nov 2006
Location: horten, norway
Distribution: gentoo / slackware / suse / red hat
Posts: 30

Rep: Reputation: 15
Which distro is it you're using?
You can get the libraries and configure && make && make install them, as usual programs. Or run emerge / apt-get / whatever is applicable to your distro to get them.
http://www.libpng.org/pub/png/libpng.html - libpng
http://www.ijg.org/ - libjpeg
http://www.remotesensing.org/libtiff/ - libtiff (can also come in handy)

mARGO
 
Old 11-11-2006, 01:10 PM   #3
ihopeto
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Original Poster
Rep: Reputation: 0
I have all these files downloaded along with zlib, as it is required also.

I did configure, make test, and make install for the zlib and the png...and the test passed. Now the JPEG part I am not sure about. I am uncertain what I need to do to get this configured right.

I did configure, make test...but I really dont know if it is working right....didnt say passed test like the other groups.




So if it is working what does my configure statement look like for the PHP....and how do I know it is working right.

./configure --with-gd --with-jpeg ????????????????

I am not good at this part unless the cookbook works and the details are exacting.
 
Old 11-11-2006, 01:57 PM   #4
ihopeto
LQ Newbie
 
Registered: Jan 2006
Posts: 19

Original Poster
Rep: Reputation: 0
OK, I have the functions working now.

I did
configure
make
make test
make -n install

for zlib, png, jpeg


then I used this configure statement for php

[root@localhost /php441]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql -with-gd --with-jpeg-dir=/usr/bin/install --with-zlib-dir=user/bin/install --with-png-dir=/usr/bin/install

I still get the following errors when I test the make.

TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 76
Exts tested : 11
---------------------------------------------------------------------
Number of tests : 639
Tests skipped : 266 (41.6%)
Tests warned : 0 (0.0%)
Tests failed : 8 (1.3%)
Tests passed : 365 (57.1%)
---------------------------------------------------------------------
Time taken : 71 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #22544 (TrueColor transparency in PNG images). [ext/gd/tests/bug22544.phpt]
Bug #24155 (gdImageRotate270 rotation problem). [ext/gd/tests/bug24155.phpt]
Bug #27582 (ImageFillToBorder() on alphablending image looses alpha on fill color) [ext/gd/tests/bug27582_1.phpt]
Bug #28984 (imagefill segfault using a transparent color). [ext/gd/tests/bug28984.phpt]
gif --> png conversion test [ext/gd/tests/gif2png.phpt]
jpeg <--> png conversion test [ext/gd/tests/jpeg2png.phpt]
png <--> gd1/gd2 conversion test [ext/gd/tests/png2gd.phpt]
Bug #27780 (strtotime(+1 xxx) returns a wrong date/time) [ext/standard/tests/time/bug27780.phpt]
=====================================================================

php image functions that I use work....but what are all these errors about?

Thanks for reading and thanks for helping
 
Old 11-14-2006, 02:51 AM   #5
asquante
Member
 
Registered: Nov 2006
Location: horten, norway
Distribution: gentoo / slackware / suse / red hat
Posts: 30

Rep: Reputation: 15
http://bugs.php.net/bug.php?id=22544
It has to do with the older version of libraries that don't support some things properly.

mARGO
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making smtp and php mail() functions work on Linux9 rajnair0278 Linux - Software 0 05-12-2006 06:25 AM
php and gd (image functions) devfreak Linux - Software 1 05-11-2005 05:17 PM
DBM functions don't work in PHP vharishankar Programming 4 09-26-2004 09:23 PM
PHP -- How to execute a shell script from PHP using FTP functions?? zoonalex Programming 3 07-29-2004 11:51 AM
Things dont work when you dont understand withoutaclue Linux - Newbie 3 03-12-2003 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration