470,849 Members | 1,069 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

jpeg support in 5.0.4, (and libs)


I recently installed PHP 5.0.4 on my Fedora system. I compiled in the GD
option. (--with-gd). Then I tested the ImageTypes() function. It
seems .png and .gif (IMG_PNG and IMG_GIF) are supported, but jpeg
(IMG_JPEG) is not. Is this expected? How do I get .jpeg support?

-- segway --

Out of curiousity, I checked the php-config file in my ../php/bin dir
and here is the libs that are listed:

libs="-lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl
-lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz
-lm -lcrypt "

-lz is listed 6 times, -lcrypt 4 times, -lm 3 times, etc.

Is this really how it should be? I'm guessing listing the libs so many
times doesn't do any harm, but what's the point?

B Squared

-----------------------------------------------------------------------
By and large gentlemen believe in God because, by and large, they are
confident that God believes in them.
-- Douglas Sutherland, The English Gentleman
Oct 18 '05 #1
2 1432
On Tue, 18 Oct 2005 14:27:39 -0700, B Squared <nu**@null.com> wrote:
I recently installed PHP 5.0.4 on my Fedora system. I compiled in the GD
option. (--with-gd). Then I tested the ImageTypes() function. It
seems .png and .gif (IMG_PNG and IMG_GIF) are supported, but jpeg
(IMG_JPEG) is not. Is this expected? How do I get .jpeg support?
You may have to specifically use --with-jpeg-dir in configure - I've got
"--with-jpeg-dir=/usr" in the configure line I used for building PHP, which
implies at some point I added it on because JPEG support wasn't working.
-- segway --

Out of curiousity, I checked the php-config file in my ../php/bin dir
and here is the libs that are listed:

libs="-lcrypt -lcrypt -lmysqlclient -lpng -lz -lz -lresolv -lm -ldl
-lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz
-lm -lcrypt "

-lz is listed 6 times, -lcrypt 4 times, -lm 3 times, etc.

Is this really how it should be? I'm guessing listing the libs so many
times doesn't do any harm, but what's the point?


It's probably just output automatically by the build system, with each
extension adding on all the libraries they depend on, and more than one
requires libz, libcrypto, etc. Presumably the build system doesn't bother
eliminating duplicates, because the linker will anyway.
--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Oct 18 '05 #2
Andy Hassall wrote:
On Tue, 18 Oct 2005 14:27:39 -0700, B Squared <nu**@null.com> wrote:

I recently installed PHP 5.0.4 on my Fedora system. I compiled in the GD
option. (--with-gd). Then I tested the ImageTypes() function. It
seems .png and .gif (IMG_PNG and IMG_GIF) are supported, but jpeg
(IMG_JPEG) is not. Is this expected? How do I get .jpeg support?

You may have to specifically use --with-jpeg-dir in configure - I've got
"--with-jpeg-dir=/usr" in the configure line I used for building PHP, which
implies at some point I added it on because JPEG support wasn't working.


So I did as you suggested, the jpeg lib was in /usr/lib. I looked at the
configuration output and saw, among other stuff

checking for the location of libjpeg... /usr/lib

checking for jpeg_read_header in -ljpeg... yes

and there were no errors, so it looks like it worked. But the
ImageTypes() function still doesn't recognize IMG_JPEG. Any other
suggestions.

Thanks in advance.

B Squared
Oct 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Pilu | last post: by
3 posts views Thread by Steve Holden | last post: by
4 posts views Thread by uli | last post: by
9 posts views Thread by peter.mosley | last post: by
reply views Thread by Jack Wu | last post: by
11 posts views Thread by Mark B | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.